@@ -21,6 +21,9 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | public function getClassName(): string; |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @return null|Column |
|
| 26 | + */ |
|
| 24 | 27 | public function getDBALColumn(): ?Column; |
| 25 | 28 | |
| 26 | 29 | /** |
@@ -28,12 +31,24 @@ discard block |
||
| 28 | 31 | */ |
| 29 | 32 | public function getFieldMappings(): array; |
| 30 | 33 | |
| 34 | + /** |
|
| 35 | + * @return null|CallDefinitionInterface |
|
| 36 | + */ |
|
| 31 | 37 | public function getFactory(): ?CallDefinitionInterface; |
| 32 | 38 | |
| 39 | + /** |
|
| 40 | + * @return null|CallDefinitionInterface |
|
| 41 | + */ |
|
| 33 | 42 | public function getSerializer(): ?CallDefinitionInterface; |
| 34 | 43 | |
| 44 | + /** |
|
| 45 | + * @return null|string |
|
| 46 | + */ |
|
| 35 | 47 | public function getId(): ?string; |
| 36 | 48 | |
| 49 | + /** |
|
| 50 | + * @return null|string |
|
| 51 | + */ |
|
| 37 | 52 | public function getReferencedId(): ?string; |
| 38 | 53 | |
| 39 | 54 | } |
@@ -13,18 +13,13 @@ |
||
| 13 | 13 | use PHPUnit\Framework\TestCase; |
| 14 | 14 | use Addiks\RDMBundle\Hydration\EntityHydrator; |
| 15 | 15 | use Addiks\RDMBundle\Mapping\Drivers\MappingDriverInterface; |
| 16 | -use Addiks\RDMBundle\Mapping\Annotation\Service; |
|
| 17 | 16 | use Addiks\RDMBundle\Tests\Hydration\ServiceExample; |
| 18 | 17 | use Addiks\RDMBundle\Tests\Hydration\EntityExample; |
| 19 | -use ErrorException; |
|
| 20 | 18 | use Addiks\RDMBundle\Mapping\ServiceMapping; |
| 21 | 19 | use Addiks\RDMBundle\Mapping\EntityMapping; |
| 22 | 20 | use Addiks\RDMBundle\ValueResolver\ValueResolverInterface; |
| 23 | -use Addiks\RDMBundle\Exception\FailedRDMAssertionExceptionInterface; |
|
| 24 | 21 | use Addiks\RDMBundle\DataLoader\DataLoaderInterface; |
| 25 | 22 | use Doctrine\ORM\EntityManagerInterface; |
| 26 | -use Addiks\RDMBundle\Mapping\EntityMappingInterface; |
|
| 27 | -use Addiks\RDMBundle\Mapping\MappingInterface; |
|
| 28 | 23 | use Addiks\RDMBundle\Hydration\HydrationContextInterface; |
| 29 | 24 | |
| 30 | 25 | final class EntityHydratorTest extends TestCase |
@@ -23,7 +23,6 @@ |
||
| 23 | 23 | use Doctrine\DBAL\Schema\Column as DBALColumn; |
| 24 | 24 | use Doctrine\DBAL\Types\Type; |
| 25 | 25 | use Addiks\RDMBundle\Mapping\MappingInterface; |
| 26 | -use Addiks\RDMBundle\Mapping\Annotation\Obj; |
|
| 27 | 26 | use Addiks\RDMBundle\Tests\ValueObjectExample; |
| 28 | 27 | use Addiks\RDMBundle\Mapping\ObjectMapping; |
| 29 | 28 | use Doctrine\ORM\Mapping\Column as ORMColumn; |
@@ -16,7 +16,6 @@ |
||
| 16 | 16 | use Addiks\RDMBundle\Mapping\ChoiceMapping; |
| 17 | 17 | use Addiks\RDMBundle\Tests\Hydration\EntityExample; |
| 18 | 18 | use Addiks\RDMBundle\Mapping\ServiceMapping; |
| 19 | -use Addiks\RDMBundle\Mapping\MappingInterface; |
|
| 20 | 19 | use Addiks\RDMBundle\Hydration\HydrationContextInterface; |
| 21 | 20 | |
| 22 | 21 | final class ChoiceValueResolverTest extends TestCase |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | * @param array<MappingInterface> $argumentMappings |
| 139 | 139 | * @param array<scalar> $dataFromAdditionalColumns |
| 140 | 140 | * |
| 141 | - * @return array<mixed> |
|
| 141 | + * @return callable |
|
| 142 | 142 | */ |
| 143 | 143 | private function resolveArguments( |
| 144 | 144 | array $argumentMappings, |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 19 | 19 | use Addiks\RDMBundle\ValueResolver\ValueResolverInterface; |
| 20 | 20 | use Addiks\RDMBundle\Hydration\HydrationContextInterface; |
| 21 | -use Addiks\RDMBundle\Exception\InvalidMappingException; |
|
| 22 | 21 | |
| 23 | 22 | final class CallDefinitionExecuter implements CallDefinitionExecuterInterface |
| 24 | 23 | { |
@@ -112,10 +112,10 @@ |
||
| 112 | 112 | $callee = $context->getEntity(); |
| 113 | 113 | |
| 114 | 114 | } elseif (in_array($objectReference, ['self', 'this'])) { |
| 115 | - $callee = $hydrationStack[count($hydrationStack)-1]; |
|
| 115 | + $callee = $hydrationStack[count($hydrationStack) - 1]; |
|
| 116 | 116 | |
| 117 | 117 | } elseif (in_array($objectReference, ['parent'])) { |
| 118 | - $callee = $hydrationStack[count($hydrationStack)-2]; |
|
| 118 | + $callee = $hydrationStack[count($hydrationStack) - 2]; |
|
| 119 | 119 | |
| 120 | 120 | } elseif ($objectReference[0] === '@') { |
| 121 | 121 | /** @var string $serviceId */ |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | { |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * @param object $entity |
|
| 23 | 22 | * @param array<scalar> $dataFromAdditionalColumns |
| 24 | 23 | * |
| 25 | 24 | * @return mixed |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | $choiceMapping, |
| 99 | 99 | $context, |
| 100 | 100 | [] # <= I'm not sure how this parameter should be handled correctly in the future, |
| 101 | - # but with the current supported features it *should* be irrelevant. |
|
| 101 | + # but with the current supported features it *should* be irrelevant. |
|
| 102 | 102 | ); |
| 103 | 103 | |
| 104 | 104 | if ($choiceValue === $valueFromEntityField) { |