Completed
Pull Request — master (#1241)
by Marco
12:49
created
lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -19,13 +19,11 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\ORM\Tools;
21 21
 
22
-use Doctrine\Common\Persistence\Proxy;
23 22
 use Doctrine\ORM\EntityManagerInterface;
24 23
 use Doctrine\ORM\Event\OnFlushEventArgs;
25 24
 use Doctrine\ORM\Mapping\ClassMetadata;
26 25
 use Doctrine\ORM\PersistentCollection;
27 26
 use Doctrine\ORM\UnitOfWork;
28
-use Doctrine\ORM\EntityManager;
29 27
 use ProxyManager\Proxy\GhostObjectInterface;
30 28
 
31 29
 /**
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -89,42 +89,42 @@
 block discarded – undo
89 89
 
90 90
         fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n");
91 91
         foreach ($identityMap as $className => $map) {
92
-            fwrite($fh, "Class: ". $className . "\n");
92
+            fwrite($fh, "Class: ".$className."\n");
93 93
 
94 94
             foreach ($map as $entity) {
95
-                fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n");
95
+                fwrite($fh, " Entity: ".$this->getIdString($entity, $uow)." ".spl_object_hash($entity)."\n");
96 96
                 fwrite($fh, "  Associations:\n");
97 97
 
98 98
                 $cm = $em->getClassMetadata($className);
99 99
 
100 100
                 foreach ($cm->associationMappings as $field => $assoc) {
101
-                    fwrite($fh, "   " . $field . " ");
101
+                    fwrite($fh, "   ".$field." ");
102 102
                     $value = $cm->getFieldValue($entity, $field);
103 103
 
104 104
                     if ($assoc['type'] & ClassMetadata::TO_ONE) {
105 105
                         if ($value === null) {
106 106
                             fwrite($fh, " NULL\n");
107 107
                         } else {
108
-                            if ($value instanceof GhostObjectInterface && !$value->isProxyInitialized()) {
108
+                            if ($value instanceof GhostObjectInterface && ! $value->isProxyInitialized()) {
109 109
                                 fwrite($fh, "[PROXY] ");
110 110
                             }
111 111
 
112
-                            fwrite($fh, $this->getIdString($value, $uow) . " " . spl_object_hash($value) . "\n");
112
+                            fwrite($fh, $this->getIdString($value, $uow)." ".spl_object_hash($value)."\n");
113 113
                         }
114 114
                     } else {
115
-                        $initialized = !($value instanceof PersistentCollection) || $value->isInitialized();
115
+                        $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized();
116 116
                         if ($value === null) {
117 117
                             fwrite($fh, " NULL\n");
118 118
                         } elseif ($initialized) {
119
-                            fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n");
119
+                            fwrite($fh, "[INITIALIZED] ".$this->getType($value)." ".count($value)." elements\n");
120 120
 
121 121
                             foreach ($value as $obj) {
122
-                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
122
+                                fwrite($fh, "    ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n");
123 123
                             }
124 124
                         } else {
125
-                            fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n");
125
+                            fwrite($fh, "[PROXY] ".$this->getType($value)." unknown element size\n");
126 126
                             foreach ($value->unwrap() as $obj) {
127
-                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
127
+                                fwrite($fh, "    ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n");
128 128
                             }
129 129
                         }
130 130
                     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
     /**
1238 1238
      * Schedules an entity for being updated.
1239 1239
      *
1240
-     * @param object $entity The entity to schedule for being updated.
1240
+     * @param \Doctrine\Tests\Models\Forum\ForumUser $entity The entity to schedule for being updated.
1241 1241
      *
1242 1242
      * @return void
1243 1243
      *
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
     /**
1306 1306
      * Checks whether an entity is registered to be checked in the unit of work.
1307 1307
      *
1308
-     * @param object $entity
1308
+     * @param \Doctrine\Tests\ORM\NotifyChangedEntity $entity
1309 1309
      *
1310 1310
      * @return boolean
1311 1311
      */
@@ -3130,7 +3130,7 @@  discard block
 block discarded – undo
3130 3130
      *
3131 3131
      * @param object $entity       The entity that owns the property.
3132 3132
      * @param string $propertyName The name of the property that changed.
3133
-     * @param mixed  $oldValue     The old value of the property.
3133
+     * @param null|integer  $oldValue     The old value of the property.
3134 3134
      * @param mixed  $newValue     The new value of the property.
3135 3135
      *
3136 3136
      * @return void
@@ -3330,7 +3330,7 @@  discard block
 block discarded – undo
3330 3330
     /**
3331 3331
      * Verifies if two given entities actually are the same based on identifier comparison
3332 3332
      *
3333
-     * @param object $entity1
3333
+     * @param GhostObjectInterface $entity1
3334 3334
      * @param object $entity2
3335 3335
      *
3336 3336
      * @return bool
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         $state = $this->getEntityState($entity);
465 465
 
466 466
         if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) {
467
-            throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity));
467
+            throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity));
468 468
         }
469 469
 
470 470
         $class = $this->em->getClassMetadata(get_class($entity));
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
                     if ($owner === null) { // cloned
683 683
                         $actualValue->setOwner($entity, $assoc);
684 684
                     } else if ($owner !== $entity) { // no clone, we have to fix
685
-                        if (!$actualValue->isInitialized()) {
685
+                        if ( ! $actualValue->isInitialized()) {
686 686
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
687 687
                         }
688 688
                         $newValue = clone $actualValue;
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
         $targetClass    = $this->em->getClassMetadata($assoc['targetEntity']);
829 829
 
830 830
         foreach ($unwrappedValue as $key => $entry) {
831
-            if (! ($entry instanceof $targetClass->name)) {
831
+            if ( ! ($entry instanceof $targetClass->name)) {
832 832
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry);
833 833
             }
834 834
 
@@ -1687,7 +1687,7 @@  discard block
 block discarded – undo
1687 1687
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
1688 1688
 
1689 1689
             default:
1690
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1690
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1691 1691
         }
1692 1692
 
1693 1693
         $this->cascadePersist($entity, $visited);
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
             case self::STATE_DETACHED:
1758 1758
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
1759 1759
             default:
1760
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1760
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1761 1761
         }
1762 1762
 
1763 1763
     }
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
      */
1918 1918
     private function isLoaded($entity)
1919 1919
     {
1920
-        return !($entity instanceof GhostObjectInterface) || $entity->isProxyInitialized();
1920
+        return ! ($entity instanceof GhostObjectInterface) || $entity->isProxyInitialized();
1921 1921
     }
1922 1922
 
1923 1923
     /**
@@ -2075,7 +2075,7 @@  discard block
 block discarded – undo
2075 2075
 
2076 2076
         $associationMappings = array_filter(
2077 2077
             $class->associationMappings,
2078
-            function ($assoc) { return $assoc['isCascadeRefresh']; }
2078
+            function($assoc) { return $assoc['isCascadeRefresh']; }
2079 2079
         );
2080 2080
 
2081 2081
         foreach ($associationMappings as $assoc) {
@@ -2118,7 +2118,7 @@  discard block
 block discarded – undo
2118 2118
 
2119 2119
         $associationMappings = array_filter(
2120 2120
             $class->associationMappings,
2121
-            function ($assoc) { return $assoc['isCascadeDetach']; }
2121
+            function($assoc) { return $assoc['isCascadeDetach']; }
2122 2122
         );
2123 2123
 
2124 2124
         foreach ($associationMappings as $assoc) {
@@ -2162,7 +2162,7 @@  discard block
 block discarded – undo
2162 2162
 
2163 2163
         $associationMappings = array_filter(
2164 2164
             $class->associationMappings,
2165
-            function ($assoc) { return $assoc['isCascadeMerge']; }
2165
+            function($assoc) { return $assoc['isCascadeMerge']; }
2166 2166
         );
2167 2167
 
2168 2168
         foreach ($associationMappings as $assoc) {
@@ -2201,7 +2201,7 @@  discard block
 block discarded – undo
2201 2201
 
2202 2202
         $associationMappings = array_filter(
2203 2203
             $class->associationMappings,
2204
-            function ($assoc) { return $assoc['isCascadePersist']; }
2204
+            function($assoc) { return $assoc['isCascadePersist']; }
2205 2205
         );
2206 2206
 
2207 2207
         foreach ($associationMappings as $assoc) {
@@ -2230,7 +2230,7 @@  discard block
 block discarded – undo
2230 2230
                     break;
2231 2231
 
2232 2232
                 case ($relatedEntities !== null):
2233
-                    if (! $relatedEntities instanceof $assoc['targetEntity']) {
2233
+                    if ( ! $relatedEntities instanceof $assoc['targetEntity']) {
2234 2234
                         throw ORMInvalidArgumentException::invalidAssociation(
2235 2235
                             $this->em->getClassMetadata($assoc['targetEntity']),
2236 2236
                             $assoc,
@@ -2261,13 +2261,13 @@  discard block
 block discarded – undo
2261 2261
 
2262 2262
         $associationMappings = array_filter(
2263 2263
             $class->associationMappings,
2264
-            function ($assoc) { return $assoc['isCascadeRemove']; }
2264
+            function($assoc) { return $assoc['isCascadeRemove']; }
2265 2265
         );
2266 2266
 
2267 2267
         $entitiesToCascade = array();
2268 2268
 
2269 2269
         foreach ($associationMappings as $assoc) {
2270
-            if ($entity instanceof GhostObjectInterface && !$entity->isProxyInitialized()) {
2270
+            if ($entity instanceof GhostObjectInterface && ! $entity->isProxyInitialized()) {
2271 2271
                 $entity->initializeProxy();
2272 2272
             }
2273 2273
 
@@ -2331,7 +2331,7 @@  discard block
 block discarded – undo
2331 2331
                     return;
2332 2332
                 }
2333 2333
 
2334
-                if ($entity instanceof Proxy && !$entity->__isInitialized__) {
2334
+                if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
2335 2335
                     $entity->__load();
2336 2336
                 }
2337 2337
 
@@ -2346,7 +2346,7 @@  discard block
 block discarded – undo
2346 2346
             case LockMode::NONE === $lockMode:
2347 2347
             case LockMode::PESSIMISTIC_READ === $lockMode:
2348 2348
             case LockMode::PESSIMISTIC_WRITE === $lockMode:
2349
-                if (!$this->em->getConnection()->isTransactionActive()) {
2349
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
2350 2350
                     throw TransactionRequiredException::transactionRequired();
2351 2351
                 }
2352 2352
 
@@ -2691,7 +2691,7 @@  discard block
 block discarded – undo
2691 2691
                             // then we can append this entity for eager loading!
2692 2692
                             if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER &&
2693 2693
                                 isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2694
-                                !$targetClass->isIdentifierComposite &&
2694
+                                ! $targetClass->isIdentifierComposite &&
2695 2695
                                 $newValue instanceof GhostObjectInterface &&
2696 2696
                                 $newValue->isProxyInitialized() === false) {
2697 2697
 
@@ -3003,7 +3003,7 @@  discard block
 block discarded – undo
3003 3003
      */
3004 3004
     public function size()
3005 3005
     {
3006
-        $countArray = array_map(function ($item) { return count($item); }, $this->identityMap);
3006
+        $countArray = array_map(function($item) { return count($item); }, $this->identityMap);
3007 3007
 
3008 3008
         return array_sum($countArray);
3009 3009
     }
@@ -3062,7 +3062,7 @@  discard block
 block discarded – undo
3062 3062
     public function getCollectionPersister(array $association)
3063 3063
     {
3064 3064
         $role = isset($association['cache'])
3065
-            ? $association['sourceEntity'] . '::' . $association['fieldName']
3065
+            ? $association['sourceEntity'].'::'.$association['fieldName']
3066 3066
             : $association['type'];
3067 3067
 
3068 3068
         if (isset($this->collectionPersisters[$role])) {
@@ -3280,7 +3280,7 @@  discard block
 block discarded – undo
3280 3280
      */
3281 3281
     private function afterTransactionComplete()
3282 3282
     {
3283
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3283
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3284 3284
             $persister->afterTransactionComplete();
3285 3285
         });
3286 3286
     }
@@ -3290,7 +3290,7 @@  discard block
 block discarded – undo
3290 3290
      */
3291 3291
     private function afterTransactionRolledBack()
3292 3292
     {
3293
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3293
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3294 3294
             $persister->afterTransactionRolledBack();
3295 3295
         });
3296 3296
     }
@@ -3389,7 +3389,7 @@  discard block
 block discarded – undo
3389 3389
                     if ($other === null) {
3390 3390
                         $prop->setValue($managedCopy, null);
3391 3391
                     } else {
3392
-                        if ($other instanceof Proxy && !$other->__isInitialized()) {
3392
+                        if ($other instanceof Proxy && ! $other->__isInitialized()) {
3393 3393
                             // do not merge fields marked lazy that have not been fetched.
3394 3394
                             continue;
3395 3395
                         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC522Test.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Doctrine\Tests\ORM\Functional\Ticket;
4 4
 
5
-use Doctrine\Tests\Models\Company\CompanyPerson;
6 5
 use ProxyManager\Proxy\GhostObjectInterface;
7 6
 
8 7
 /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Doctrine\Tests\ORM\Functional\Ticket;
4 4
 
5
-use DateTime;
6 5
 use ProxyManager\Proxy\GhostObjectInterface;
7 6
 
8 7
 class DDC633Test extends \Doctrine\Tests\OrmFunctionalTestCase
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             $class->reflFields[$fieldName]->setValue($entity, $value);
203 203
             $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value);
204 204
 
205
-            $this->initializedCollections[$oid . $fieldName] = $value;
205
+            $this->initializedCollections[$oid.$fieldName] = $value;
206 206
         } else if (
207 207
             isset($this->_hints[Query::HINT_REFRESH]) ||
208 208
             isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) &&
@@ -213,10 +213,10 @@  discard block
 block discarded – undo
213 213
             $value->setInitialized(true);
214 214
             $value->unwrap()->clear();
215 215
 
216
-            $this->initializedCollections[$oid . $fieldName] = $value;
216
+            $this->initializedCollections[$oid.$fieldName] = $value;
217 217
         } else {
218 218
             // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN!
219
-            $this->existingCollections[$oid . $fieldName] = $value;
219
+            $this->existingCollections[$oid.$fieldName] = $value;
220 220
         }
221 221
 
222 222
         return $value;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             $idHash = '';
290 290
 
291 291
             foreach ($class->identifier as $fieldName) {
292
-                $idHash .= ' ' . (isset($class->associationMappings[$fieldName])
292
+                $idHash .= ' '.(isset($class->associationMappings[$fieldName])
293 293
                     ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
294 294
                     : $data[$fieldName]);
295 295
             }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                 $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias];
343 343
                 // we need the $path to save into the identifier map which entities were already
344 344
                 // seen for this parent-child relationship
345
-                $path = $parentAlias . '.' . $dqlAlias;
345
+                $path = $parentAlias.'.'.$dqlAlias;
346 346
 
347 347
                 // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs
348 348
                 if ( ! isset($nonemptyComponents[$parentAlias])) {
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
                     $reflFieldValue = $reflField->getValue($parentObject);
383 383
 
384 384
                     if (isset($nonemptyComponents[$dqlAlias])) {
385
-                        $collKey = $oid . $relationField;
385
+                        $collKey = $oid.$relationField;
386 386
                         if (isset($this->initializedCollections[$collKey])) {
387 387
                             $reflFieldValue = $this->initializedCollections[$collKey];
388 388
                         } else if ( ! isset($this->existingCollections[$collKey])) {
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
                     // PATH B: Single-valued association
431 431
                     $reflFieldValue = $reflField->getValue($parentObject);
432 432
 
433
-                    if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof GhostObjectInterface && !$reflFieldValue->isProxyInitialized())) {
433
+                    if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) {
434 434
                         // we only need to take action if this value is null,
435 435
                         // we refresh the entity or its an unitialized proxy.
436 436
                         if (isset($nonemptyComponents[$dqlAlias])) {
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
                 $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0;
476 476
 
477 477
                 // if this row has a NULL value for the root result id then make it a null result.
478
-                if ( ! isset($nonemptyComponents[$dqlAlias]) ) {
478
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
479 479
                     if ($this->_rsm->isMixed) {
480 480
                         $result[] = array($entityKey => null);
481 481
                     } else {
@@ -531,13 +531,13 @@  discard block
 block discarded – undo
531 531
             }
532 532
         }
533 533
 
534
-        if ( ! isset($resultKey) ) {
534
+        if ( ! isset($resultKey)) {
535 535
             $this->resultCounter++;
536 536
         }
537 537
 
538 538
         // Append scalar values to mixed result sets
539 539
         if (isset($rowData['scalars'])) {
540
-            if ( ! isset($resultKey) ) {
540
+            if ( ! isset($resultKey)) {
541 541
                 $resultKey = (isset($this->_rsm->indexByMap['scalars']))
542 542
                     ? $row[$this->_rsm->indexByMap['scalars']]
543 543
                     : $this->resultCounter - 1;
@@ -550,19 +550,19 @@  discard block
 block discarded – undo
550 550
 
551 551
         // Append new object to mixed result sets
552 552
         if (isset($rowData['newObjects'])) {
553
-            if ( ! isset($resultKey) ) {
553
+            if ( ! isset($resultKey)) {
554 554
                 $resultKey = $this->resultCounter - 1;
555 555
             }
556 556
 
557 557
 
558
-            $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0);
558
+            $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0);
559 559
 
560 560
             foreach ($rowData['newObjects'] as $objIndex => $newObject) {
561 561
                 $class  = $newObject['class'];
562 562
                 $args   = $newObject['args'];
563 563
                 $obj    = $class->newInstanceArgs($args);
564 564
 
565
-                if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) {
565
+                if ($scalarCount == 0 && count($rowData['newObjects']) == 1) {
566 566
                     $result[$resultKey] = $obj;
567 567
 
568 568
                     continue;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Proxy/ProxyFactory.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
         $definition = $this->createProxyDefinition($className);
104 104
         $fqcn       = $definition->proxyClassName;
105 105
 
106
-        if (! class_exists($fqcn, false)) {
106
+        if ( ! class_exists($fqcn, false)) {
107 107
             $generatorStrategy    = new EvaluatingGeneratorStrategy();
108 108
             $proxyGenerator       = new ClassGenerator();
109 109
             $skippedProperties    = array_filter(
110 110
                 Properties::fromReflectionClass(new ReflectionClass($className))->getInstanceProperties(),
111
-                function (ReflectionProperty $property) use ($definition) {
111
+                function(ReflectionProperty $property) use ($definition) {
112 112
                     return ! in_array(
113 113
                             $property->getName(),
114 114
                             array_map(
115
-                                function (ReflectionProperty $property) {
115
+                                function(ReflectionProperty $property) {
116 116
                                     return $property->getName();
117 117
                                 },
118 118
                                 $definition->reflectionFields
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $proxy = $fqcn::staticProxyConstructor($definition->initializer/*, $definition->cloner*/);
139 139
 
140 140
         foreach ($definition->identifierFields as $idField) {
141
-            if (! isset($identifier[$idField])) {
141
+            if ( ! isset($identifier[$idField])) {
142 142
                 throw OutOfBoundsException::missingPrimaryKeyValue($className, $idField);
143 143
             }
144 144
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     private function createInitializer(ClassMetadata $classMetadata, EntityPersister $entityPersister, \Closure $cloner)
213 213
     {
214
-        return function (
214
+        return function(
215 215
             GhostObjectInterface $proxy,
216 216
             $method,
217 217
             $parameters,
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             $classMetadata,
222 222
             $cloner
223 223
         ) {
224
-            if (! $initializer) {
224
+            if ( ! $initializer) {
225 225
                 return false;
226 226
             }
227 227
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      */
257 257
     private function createCloner(ClassMetadata $classMetadata, EntityPersister $entityPersister)
258 258
     {
259
-        return function (GhostObjectInterface $proxy, & $initializer) use ($entityPersister, $classMetadata) {
259
+        return function(GhostObjectInterface $proxy, & $initializer) use ($entityPersister, $classMetadata) {
260 260
             if ($proxy->isProxyInitialized()) {
261 261
                 return;
262 262
             }
@@ -293,12 +293,12 @@  discard block
 block discarded – undo
293 293
     private function getInternalReflectionPropertyName(ReflectionProperty $reflectionProperty)
294 294
     {
295 295
         if ($reflectionProperty->isProtected()) {
296
-            return "\0*\0" . $reflectionProperty->getName();
296
+            return "\0*\0".$reflectionProperty->getName();
297 297
         }
298 298
 
299 299
         if ($reflectionProperty->isPrivate()) {
300
-            return "\0" . $reflectionProperty->getDeclaringClass()->getName()
301
-            . "\0" . $reflectionProperty->getName();
300
+            return "\0".$reflectionProperty->getDeclaringClass()->getName()
301
+            . "\0".$reflectionProperty->getName();
302 302
         }
303 303
 
304 304
         return $reflectionProperty->getName();
Please login to merge, or discard this patch.