-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
use Doctrine\ORM\Mapping\PropertyAccessors\EmbeddablePropertyAccessor; | ||
use ArrayAccess; | ||
use Doctrine\Persistence\Mapping\ReflectionService; | ||
use Doctrine\Persistence\Reflection\EnumReflectionProperty; | ||
use ReflectionClass; | ||
use IteratorAggregate; | ||
use OutOfBoundsException; | ||
use ReflectionProperty; | ||
use Traversable; | ||
|
||
class LegacyReflectionFields implements \ArrayAccess, \IteratorAggregate | ||
use function array_keys; | ||
use function str_contains; | ||
use function str_replace; | ||
|
||
class LegacyReflectionFields implements ArrayAccess, IteratorAggregate | ||
Check failure on line 19 in src/Mapping/LegacyReflectionFields.php GitHub Actions / Static Analysis with Psalm (default)MissingTemplateParam
Check failure on line 19 in src/Mapping/LegacyReflectionFields.php GitHub Actions / Static Analysis with Psalm (default)MissingTemplateParam
Check failure on line 19 in src/Mapping/LegacyReflectionFields.php GitHub Actions / Static Analysis with Psalm (3.8.2)MissingTemplateParam
Check failure on line 19 in src/Mapping/LegacyReflectionFields.php GitHub Actions / Static Analysis with Psalm (3.8.2)MissingTemplateParam
|
||
{ | ||
private array $reflFields = []; | ||
Check failure on line 21 in src/Mapping/LegacyReflectionFields.php GitHub Actions / coding-standards / Coding Standards (8.3)
|
||
|
||
|
@@ -55,7 +62,7 @@ public function offsetGet($field): mixed | |
if ($this->classMetadata->fieldMappings[$field]->originalField !== null) { | ||
$parentField = str_replace('.' . $fieldName, '', $field); | ||
|
||
if (!str_contains($parentField, '.')) { | ||
if (! str_contains($parentField, '.')) { | ||
$parentClass = $this->classMetadata->name; | ||
} else { | ||
$parentClass = $this->classMetadata->fieldMappings[$parentField]->originalClass; | ||
|
@@ -72,7 +79,7 @@ public function offsetGet($field): mixed | |
return $this->reflFields[$field]; | ||
} | ||
|
||
throw new \OutOfBoundsException('Unknown field: ' . $this->classMetadata->name .' ::$' . $field); | ||
throw new OutOfBoundsException('Unknown field: ' . $this->classMetadata->name . ' ::$' . $field); | ||
} | ||
|
||
public function offsetSet($offset, $value): void | ||
Check failure on line 85 in src/Mapping/LegacyReflectionFields.php GitHub Actions / coding-standards / Coding Standards (8.3)
Check failure on line 85 in src/Mapping/LegacyReflectionFields.php GitHub Actions / coding-standards / Coding Standards (8.3)
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping\PropertyAccessors; | ||
|
||
interface PropertyAccessor | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping\PropertyAccessors; | ||
|
||
use InvalidArgumentException; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping\PropertyAccessors; | ||
|
||
use Closure; | ||
|