Passed
Push — master ( 356755...14835f )
by Gerrit
04:25
created
Mapping/ObjectMappingInterface.php 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -21,6 +21,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Tests/Hydration/EntityHydratorTest.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -13,18 +13,13 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Tests/Mapping/Drivers/MappingAnnotationDriverTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Tests/ValueResolver/ChoiceValueResolverTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
ValueResolver/CallDefinitionExecuter.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,10 +112,10 @@
 block discarded – undo
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 */
Please login to merge, or discard this patch.
ValueResolver/CallDefinitionExecuterInterface.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 {
20 20
 
21 21
     /**
22
-     * @param object                  $entity
23 22
      * @param array<scalar>           $dataFromAdditionalColumns
24 23
      *
25 24
      * @return mixed
Please login to merge, or discard this patch.
ValueResolver/ChoiceValueResolver.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.