Passed
Pull Request — 10.1.x (#99)
by Tom
11:53
created
src/Type/Entity/Entity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->hydratorFactory     = $container->get(HydratorContainer::class);
67 67
         $this->typeContainer       = $container->get(TypeContainer::class);
68 68
 
69
-        if (! isset($container->get('metadata')[$typeName])) {
69
+        if (!isset($container->get('metadata')[$typeName])) {
70 70
             throw new Error(
71 71
                 'Entity ' . $typeName . ' is not mapped in the metadata',
72 72
             );
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $aliasMap = [];
113 113
 
114 114
         foreach ($this->metadata['fields'] as $fieldName => $fieldMetadata) {
115
-            if (! isset($fieldMetadata['alias'])) {
115
+            if (!isset($fieldMetadata['alias'])) {
116 116
                 continue;
117 117
             }
118 118
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass());
184 184
 
185 185
         foreach ($classMetadata->getFieldNames() as $fieldName) {
186
-            if (! in_array($fieldName, array_keys($this->metadata['fields']))) {
186
+            if (!in_array($fieldName, array_keys($this->metadata['fields']))) {
187 187
                 continue;
188 188
             }
189 189
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass());
202 202
 
203 203
         foreach ($classMetadata->getAssociationNames() as $associationName) {
204
-            if (! in_array($associationName, array_keys($this->metadata['fields']))) {
204
+            if (!in_array($associationName, array_keys($this->metadata['fields']))) {
205 205
                 continue;
206 206
             }
207 207
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 ])
215 215
             ) {
216 216
                 $targetEntity             = $associationMetadata['targetEntity'];
217
-                $fields[$associationName] = function () use ($targetEntity) {
217
+                $fields[$associationName] = function() use ($targetEntity) {
218 218
                     $entity = $this->entityTypeContainer->get($targetEntity);
219 219
 
220 220
                     return [
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             // Collections
230 230
             $targetEntity = $associationMetadata['targetEntity'];
231 231
 
232
-            $fields[$this->getAliasMap()[$associationName] ?? $associationName] = function () use ($targetEntity, $associationName) {
232
+            $fields[$this->getAliasMap()[$associationName] ?? $associationName] = function() use ($targetEntity, $associationName) {
233 233
                 $entity    = $this->entityTypeContainer->get($targetEntity);
234 234
                 $shortName = $this->getTypeName() . '_' . ucwords($associationName);
235 235
 
Please login to merge, or discard this patch.