Failed Conditions
Pull Request — master (#7242)
by Gabriel
08:46
created
tests/Doctrine/Tests/TestUtil.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $realDbParams = self::getParamsForMainConnection();
92 92
 
93
-        if (! self::$initialized) {
93
+        if ( ! self::$initialized) {
94 94
             $tmpDbParams = self::getParamsForTemporaryConnection();
95 95
 
96 96
             $realConn = DriverManager::getConnection($realDbParams);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
     private static function addDbEventSubscribers(Connection $conn)
143 143
     {
144
-        if (! isset($GLOBALS['db_event_subscribers'])) {
144
+        if ( ! isset($GLOBALS['db_event_subscribers'])) {
145 145
             return;
146 146
         }
147 147
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultQueryCache.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function get(QueryCacheKey $key, ResultSetMapping $rsm, array $hints = [])
64 64
     {
65
-        if (! ($key->cacheMode & Cache::MODE_GET)) {
65
+        if ( ! ($key->cacheMode & Cache::MODE_GET)) {
66 66
             return null;
67 67
         }
68 68
 
69 69
         $cacheEntry = $this->region->get($key);
70 70
 
71
-        if (! $cacheEntry instanceof QueryCacheEntry) {
71
+        if ( ! $cacheEntry instanceof QueryCacheEntry) {
72 72
             return null;
73 73
         }
74 74
 
75
-        if (! $this->validator->isValid($key, $cacheEntry)) {
75
+        if ( ! $this->validator->isValid($key, $cacheEntry)) {
76 76
             $this->region->evict($key);
77 77
 
78 78
             return null;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         $cm = $this->em->getClassMetadata($entityName);
90 90
 
91
-        $generateKeys = function (array $entry) use ($cm) : EntityCacheKey {
91
+        $generateKeys = function(array $entry) use ($cm) : EntityCacheKey {
92 92
             return new EntityCacheKey($cm->getRootClassName(), $entry['identifier']);
93 93
         };
94 94
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 $this->cacheLogger->entityCacheHit($regionName, $cacheKeys->identifiers[$index]);
112 112
             }
113 113
 
114
-            if (! $hasRelation) {
114
+            if ( ! $hasRelation) {
115 115
                 $result[$index] = $unitOfWork->createEntity(
116 116
                     $entityEntry->class,
117 117
                     $entityEntry->resolveAssociationEntries($this->em),
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
                     continue;
157 157
                 }
158 158
 
159
-                if (! isset($assoc['list']) || empty($assoc['list'])) {
159
+                if ( ! isset($assoc['list']) || empty($assoc['list'])) {
160 160
                     continue;
161 161
                 }
162 162
 
163
-                $generateKeys = function ($id) use ($assocMetadata) : EntityCacheKey {
163
+                $generateKeys = function($id) use ($assocMetadata) : EntityCacheKey {
164 164
                     return new EntityCacheKey($assocMetadata->getRootClassName(), $id);
165 165
                 };
166 166
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                 //
211 211
                 // We need to unwrap those associations into proxy references,
212 212
                 // since we don't have actual data for them except for identifiers.
213
-                if (! ($unCachedAssociationData instanceof AssociationCacheEntry)) {
213
+                if ( ! ($unCachedAssociationData instanceof AssociationCacheEntry)) {
214 214
                     continue;
215 215
                 }
216 216
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             throw FeatureNotImplemented::multipleRootEntities();
243 243
         }
244 244
 
245
-        if (! $rsm->isSelect) {
245
+        if ( ! $rsm->isSelect) {
246 246
             throw FeatureNotImplemented::nonSelectStatements();
247 247
         }
248 248
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             throw FeatureNotImplemented::partialEntities();
251 251
         }
252 252
 
253
-        if (! ($key->cacheMode & Cache::MODE_PUT)) {
253
+        if ( ! ($key->cacheMode & Cache::MODE_PUT)) {
254 254
             return false;
255 255
         }
256 256
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $unitOfWork = $this->em->getUnitOfWork();
261 261
         $persister  = $unitOfWork->getEntityPersister($entityName);
262 262
 
263
-        if (! ($persister instanceof CachedPersister)) {
263
+        if ( ! ($persister instanceof CachedPersister)) {
264 264
             throw NonCacheableEntity::fromEntity($entityName);
265 265
         }
266 266
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
             if (($key->cacheMode & Cache::MODE_REFRESH) || ! $region->contains($entityKey)) {
274 274
                 // Cancel put result if entity put fail
275
-                if (! $persister->storeEntityCache($entity, $entityKey)) {
275
+                if ( ! $persister->storeEntityCache($entity, $entityKey)) {
276 276
                     return false;
277 277
                 }
278 278
             }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                 }
307 307
 
308 308
                 // store single nested association
309
-                if (! is_array($assocValue)) {
309
+                if ( ! is_array($assocValue)) {
310 310
                     // Cancel put result if association put fail
311 311
                     if ($this->storeAssociationCache($key, $association, $assocValue) === null) {
312 312
                         return false;
@@ -345,9 +345,9 @@  discard block
 block discarded – undo
345 345
             $assocIdentifier = $unitOfWork->getEntityIdentifier($assocValue);
346 346
             $entityKey       = new EntityCacheKey($assocMetadata->getRootClassName(), $assocIdentifier);
347 347
 
348
-            if ((! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) {
348
+            if (( ! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) {
349 349
                 // Entity put fail
350
-                if (! $assocPersister->storeEntityCache($assocValue, $entityKey)) {
350
+                if ( ! $assocPersister->storeEntityCache($assocValue, $entityKey)) {
351 351
                     return null;
352 352
                 }
353 353
             }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 
368 368
             if (($key->cacheMode & Cache::MODE_REFRESH) || ! $assocRegion->contains($entityKey)) {
369 369
                 // Entity put fail
370
-                if (! $assocPersister->storeEntityCache($assocItem, $entityKey)) {
370
+                if ( ! $assocPersister->storeEntityCache($assocItem, $entityKey)) {
371 371
                     return null;
372 372
                 }
373 373
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultCache.php 1 patch
Spacing   +16 added lines, -17 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $metadata  = $this->em->getClassMetadata($className);
56 56
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
57 57
 
58
-        if (! ($persister instanceof CachedPersister)) {
58
+        if ( ! ($persister instanceof CachedPersister)) {
59 59
             return null;
60 60
         }
61 61
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $metadata  = $this->em->getClassMetadata($className);
71 71
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
72 72
 
73
-        if (! ($persister instanceof CachedPersister)) {
73
+        if ( ! ($persister instanceof CachedPersister)) {
74 74
             return null;
75 75
         }
76 76
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $metadata  = $this->em->getClassMetadata($className);
86 86
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
87 87
 
88
-        if (! ($persister instanceof CachedPersister)) {
88
+        if ( ! ($persister instanceof CachedPersister)) {
89 89
             return false;
90 90
         }
91 91
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $metadata  = $this->em->getClassMetadata($className);
101 101
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
102 102
 
103
-        if (! ($persister instanceof CachedPersister)) {
103
+        if ( ! ($persister instanceof CachedPersister)) {
104 104
             return;
105 105
         }
106 106
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $metadata  = $this->em->getClassMetadata($className);
116 116
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
117 117
 
118
-        if (! ($persister instanceof CachedPersister)) {
118
+        if ( ! ($persister instanceof CachedPersister)) {
119 119
             return;
120 120
         }
121 121
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         foreach ($metadatas as $metadata) {
133 133
             $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
134 134
 
135
-            if (! ($persister instanceof CachedPersister)) {
135
+            if ( ! ($persister instanceof CachedPersister)) {
136 136
                 continue;
137 137
             }
138 138
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $metadata  = $this->em->getClassMetadata($className);
149 149
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
150 150
 
151
-        if (! ($persister instanceof CachedPersister)) {
151
+        if ( ! ($persister instanceof CachedPersister)) {
152 152
             return false;
153 153
         }
154 154
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $metadata  = $this->em->getClassMetadata($className);
164 164
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
165 165
 
166
-        if (! ($persister instanceof CachedPersister)) {
166
+        if ( ! ($persister instanceof CachedPersister)) {
167 167
             return;
168 168
         }
169 169
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $metadata  = $this->em->getClassMetadata($className);
179 179
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
180 180
 
181
-        if (! ($persister instanceof CachedPersister)) {
181
+        if ( ! ($persister instanceof CachedPersister)) {
182 182
             return;
183 183
         }
184 184
 
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
 
195 195
         foreach ($metadatas as $metadata) {
196 196
             foreach ($metadata->getDeclaredPropertiesIterator() as $association) {
197
-                if (! $association instanceof ToManyAssociationMetadata) {
197
+                if ( ! $association instanceof ToManyAssociationMetadata) {
198 198
                     continue;
199 199
                 }
200 200
 
201 201
                 $persister = $this->uow->getCollectionPersister($association);
202 202
 
203
-                if (! ($persister instanceof CachedPersister)) {
203
+                if ( ! ($persister instanceof CachedPersister)) {
204 204
                     continue;
205 205
                 }
206 206
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             return;
229 229
         }
230 230
 
231
-        if (! isset($this->queryCaches[$regionName])) {
231
+        if ( ! isset($this->queryCaches[$regionName])) {
232 232
             return;
233 233
         }
234 234
 
@@ -253,11 +253,10 @@  discard block
 block discarded – undo
253 253
     public function getQueryCache($regionName = null)
254 254
     {
255 255
         if ($regionName === null) {
256
-            return $this->defaultQueryCache ?:
257
-                $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em);
256
+            return $this->defaultQueryCache ?: $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em);
258 257
         }
259 258
 
260
-        if (! isset($this->queryCaches[$regionName])) {
259
+        if ( ! isset($this->queryCaches[$regionName])) {
261 260
             $this->queryCaches[$regionName] = $this->cacheFactory->buildQueryCache($this->em, $regionName);
262 261
         }
263 262
 
@@ -272,7 +271,7 @@  discard block
 block discarded – undo
272 271
      */
273 272
     private function buildEntityCacheKey(ClassMetadata $metadata, $identifier)
274 273
     {
275
-        if (! is_array($identifier)) {
274
+        if ( ! is_array($identifier)) {
276 275
             $identifier = $this->toIdentifierArray($metadata, $identifier);
277 276
         }
278 277
 
@@ -288,7 +287,7 @@  discard block
 block discarded – undo
288 287
      */
289 288
     private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier)
290 289
     {
291
-        if (! is_array($ownerIdentifier)) {
290
+        if ( ! is_array($ownerIdentifier)) {
292 291
             $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier);
293 292
         }
294 293
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $targetHydrator  = $targetPersister->getEntityHydrator();
144 144
 
145 145
         // Only preserve ordering if association configured it
146
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
146
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
147 147
             // Elements may be an array or a Collection
148 148
             $elements = array_values($elements instanceof Collection ? $elements->getValues() : $elements);
149 149
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
         $cached = $this->region->put($key, $entry);
172 172
 
173
-        if (! $this->cacheLogger || ! $cached) {
173
+        if ( ! $this->cacheLogger || ! $cached) {
174 174
             return;
175 175
         }
176 176
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
         $this->region->evict($key);
265 265
 
266
-        if (! $this->cacheLogger) {
266
+        if ( ! $this->cacheLogger) {
267 267
             return;
268 268
         }
269 269
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
         $targetRegion->evict($key);
285 285
 
286
-        if (! $this->cacheLogger) {
286
+        if ( ! $this->cacheLogger) {
287 287
             return;
288 288
         }
289 289
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             $associations = [];
213 213
 
214 214
             foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
215
-                if (! ($association instanceof ToOneAssociationMetadata) ||
215
+                if ( ! ($association instanceof ToOneAssociationMetadata) ||
216 216
                     ! $association->getCache() ||
217 217
                     ($association->getFetchMode() !== FetchMode::EAGER || ! $association->isOwningSide())) {
218 218
                     continue;
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             ? $this->persister->expandCriteriaParameters($criteria)
262 262
             : $this->persister->expandParameters($criteria);
263 263
 
264
-        return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset);
264
+        return sha1($query.serialize($params).serialize($orderBy).$limit.$offset);
265 265
     }
266 266
 
267 267
     /**
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
         $hasCache  = ($persister instanceof CachedPersister);
560 560
         $key       = null;
561 561
 
562
-        if (! $hasCache) {
562
+        if ( ! $hasCache) {
563 563
             return $this->persister->loadManyToManyCollection($association, $sourceEntity, $collection);
564 564
         }
565 565
 
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
         $persister = $uow->getCollectionPersister($association);
599 599
         $hasCache  = ($persister instanceof CachedPersister);
600 600
 
601
-        if (! $hasCache) {
601
+        if ( ! $hasCache) {
602 602
             return $this->persister->loadOneToManyCollection($association, $sourceEntity, $collection);
603 603
         }
604 604
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
         $this->computeChangeSets();
338 338
 
339
-        if (! ($this->entityInsertions ||
339
+        if ( ! ($this->entityInsertions ||
340 340
                 $this->entityDeletions ||
341 341
                 $this->entityUpdates ||
342 342
                 $this->collectionUpdates ||
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
             // Entity deletions come last and need to be in reverse commit order
396 396
             if ($this->entityDeletions) {
397 397
                 foreach (array_reverse($commitOrder) as $committedEntityName) {
398
-                    if (! $this->entityDeletions) {
398
+                    if ( ! $this->entityDeletions) {
399 399
                         break; // just a performance optimisation
400 400
                     }
401 401
 
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
         $oid  = spl_object_id($entity);
479 479
         $data = [];
480 480
 
481
-        if (! isset($this->entityChangeSets[$oid])) {
481
+        if ( ! isset($this->entityChangeSets[$oid])) {
482 482
             return $data;
483 483
         }
484 484
 
@@ -555,18 +555,18 @@  discard block
 block discarded – undo
555 555
                 continue;
556 556
             }
557 557
 
558
-            if (! (( ! $class->isIdentifier($name)
558
+            if ( ! (( ! $class->isIdentifier($name)
559 559
                     || ! $class->getProperty($name) instanceof FieldMetadata
560 560
                     || ! $class->getProperty($name)->hasValueGenerator()
561 561
                     || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY
562
-                )) || (! $class->isVersioned() || $name === $class->versionProperty->getName())) {
562
+                )) || ( ! $class->isVersioned() || $name === $class->versionProperty->getName())) {
563 563
                 continue;
564 564
             }
565 565
 
566 566
             $actualData[$name] = $value;
567 567
         }
568 568
 
569
-        if (! isset($this->originalEntityData[$oid])) {
569
+        if ( ! isset($this->originalEntityData[$oid])) {
570 570
             // Entity is either NEW or MANAGED but not yet fully persisted (only has an id).
571 571
             // These result in an INSERT.
572 572
             $this->originalEntityData[$oid] = $actualData;
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
             foreach ($actualData as $propName => $actualValue) {
576 576
                 $property = $class->getProperty($propName);
577 577
 
578
-                if (! (($property instanceof FieldMetadata)) &&
578
+                if ( ! (($property instanceof FieldMetadata)) &&
579 579
                     ! (($property instanceof ToOneAssociationMetadata && $property->isOwningSide()))) {
580 580
                     continue;
581 581
                 }
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 
596 596
             foreach ($actualData as $propName => $actualValue) {
597 597
                 // skip field, its a partially omitted one!
598
-                if (! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) {
598
+                if ( ! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) {
599 599
                     continue;
600 600
                 }
601 601
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
                     if ($owner === null) { // cloned
618 618
                         $actualValue->setOwner($entity, $property);
619 619
                     } elseif ($owner !== $entity) { // no clone, we have to fix
620
-                        if (! $actualValue->isInitialized()) {
620
+                        if ( ! $actualValue->isInitialized()) {
621 621
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
622 622
                         }
623 623
 
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
                         // Check if original value exists
656 656
                         if ($orgValue instanceof PersistentCollection) {
657 657
                             // A PersistentCollection was de-referenced, so delete it.
658
-                            if (! $this->isCollectionScheduledForDeletion($orgValue)) {
658
+                            if ( ! $this->isCollectionScheduledForDeletion($orgValue)) {
659 659
                                 $this->scheduleCollectionDeletion($orgValue);
660 660
 
661 661
                                 $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 
679 679
         // Look for changes in associations of the entity
680 680
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
681
-            if (! $property instanceof AssociationMetadata) {
681
+            if ( ! $property instanceof AssociationMetadata) {
682 682
                 continue;
683 683
             }
684 684
 
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 
691 691
             $this->computeAssociationChanges($property, $value);
692 692
 
693
-            if (! ($property instanceof ManyToManyAssociationMetadata) ||
693
+            if ( ! ($property instanceof ManyToManyAssociationMetadata) ||
694 694
                 ! ($value instanceof PersistentCollection) ||
695 695
                 isset($this->entityChangeSets[$oid]) ||
696 696
                 ! $property->isOwningSide() ||
@@ -786,13 +786,13 @@  discard block
 block discarded – undo
786 786
         $targetClass    = $this->em->getClassMetadata($targetEntity);
787 787
 
788 788
         foreach ($unwrappedValue as $key => $entry) {
789
-            if (! ($entry instanceof $targetEntity)) {
789
+            if ( ! ($entry instanceof $targetEntity)) {
790 790
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry);
791 791
             }
792 792
 
793 793
             $state = $this->getEntityState($entry, self::STATE_NEW);
794 794
 
795
-            if (! ($entry instanceof $targetEntity)) {
795
+            if ( ! ($entry instanceof $targetEntity)) {
796 796
                 throw UnexpectedAssociationValue::create(
797 797
                     $association->getSourceEntity(),
798 798
                     $association->getName(),
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 
804 804
             switch ($state) {
805 805
                 case self::STATE_NEW:
806
-                    if (! in_array('persist', $association->getCascade(), true)) {
806
+                    if ( ! in_array('persist', $association->getCascade(), true)) {
807 807
                         $this->nonCascadedNewDetectedEntities[spl_object_id($entry)] = [$association, $entry];
808 808
 
809 809
                         break;
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
         $persister      = $this->getEntityPersister($class->getClassName());
853 853
         $generationPlan->executeImmediate($this->em, $entity);
854 854
 
855
-        if (! $generationPlan->containsDeferred()) {
855
+        if ( ! $generationPlan->containsDeferred()) {
856 856
             $id                            = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity));
857 857
             $this->entityIdentifiers[$oid] = $id;
858 858
         }
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
     {
884 884
         $oid = spl_object_id($entity);
885 885
 
886
-        if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
886
+        if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
887 887
             throw ORMInvalidArgumentException::entityNotManaged($entity);
888 888
         }
889 889
 
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
                     break;
906 906
 
907 907
                 case ($property instanceof FieldMetadata):
908
-                    if (! $property->isPrimaryKey()
908
+                    if ( ! $property->isPrimaryKey()
909 909
                         || ! $property->getValueGenerator()
910 910
                         || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) {
911 911
                         $actualData[$name] = $property->getValue($entity);
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
             }
920 920
         }
921 921
 
922
-        if (! isset($this->originalEntityData[$oid])) {
922
+        if ( ! isset($this->originalEntityData[$oid])) {
923 923
             throw new \RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.');
924 924
         }
925 925
 
@@ -936,13 +936,13 @@  discard block
 block discarded – undo
936 936
             $changeSet[$propName] = [$orgValue, $actualValue];
937 937
         }
938 938
 
939
-        if (! $changeSet) {
939
+        if ( ! $changeSet) {
940 940
             return;
941 941
         }
942 942
 
943 943
         if (isset($this->entityChangeSets[$oid])) {
944 944
             $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet);
945
-        } elseif (! isset($this->entityInsertions[$oid])) {
945
+        } elseif ( ! isset($this->entityInsertions[$oid])) {
946 946
             $this->entityChangeSets[$oid] = $changeSet;
947 947
             $this->entityUpdates[$oid]    = $entity;
948 948
         }
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
                 $this->recomputeSingleEntityChangeSet($class, $entity);
1014 1014
             }
1015 1015
 
1016
-            if (! empty($this->entityChangeSets[$oid])) {
1016
+            if ( ! empty($this->entityChangeSets[$oid])) {
1017 1017
 //                echo 'Update: ';
1018 1018
 //                \Doctrine\Common\Util\Debug::dump($this->entityChangeSets[$oid], 3);
1019 1019
 
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1059 1059
             // is obtained by a new entity because the old one went out of scope.
1060 1060
             //$this->entityStates[$oid] = self::STATE_NEW;
1061
-            if (! $class->isIdentifierComposite()) {
1061
+            if ( ! $class->isIdentifierComposite()) {
1062 1062
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1063 1063
 
1064 1064
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1107,13 +1107,13 @@  discard block
 block discarded – undo
1107 1107
         // Calculate dependencies for new nodes
1108 1108
         while ($class = array_pop($newNodes)) {
1109 1109
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
1110
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1110
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1111 1111
                     continue;
1112 1112
                 }
1113 1113
 
1114 1114
                 $targetClass = $this->em->getClassMetadata($property->getTargetEntity());
1115 1115
 
1116
-                if (! $calc->hasNode($targetClass->getClassName())) {
1116
+                if ( ! $calc->hasNode($targetClass->getClassName())) {
1117 1117
                     $calc->addNode($targetClass->getClassName(), $targetClass);
1118 1118
 
1119 1119
                     $newNodes[] = $targetClass;
@@ -1121,7 +1121,7 @@  discard block
 block discarded – undo
1121 1121
 
1122 1122
                 $weight = ! array_filter(
1123 1123
                     $property->getJoinColumns(),
1124
-                    function (JoinColumnMetadata $joinColumn) {
1124
+                    function(JoinColumnMetadata $joinColumn) {
1125 1125
                         return $joinColumn->isNullable();
1126 1126
                     }
1127 1127
                 );
@@ -1129,14 +1129,14 @@  discard block
 block discarded – undo
1129 1129
                 $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight);
1130 1130
 
1131 1131
                 // If the target class has mapped subclasses, these share the same dependency.
1132
-                if (! $targetClass->getSubClasses()) {
1132
+                if ( ! $targetClass->getSubClasses()) {
1133 1133
                     continue;
1134 1134
                 }
1135 1135
 
1136 1136
                 foreach ($targetClass->getSubClasses() as $subClassName) {
1137 1137
                     $targetSubClass = $this->em->getClassMetadata($subClassName);
1138 1138
 
1139
-                    if (! $calc->hasNode($subClassName)) {
1139
+                    if ( ! $calc->hasNode($subClassName)) {
1140 1140
                         $calc->addNode($targetSubClass->getClassName(), $targetSubClass);
1141 1141
 
1142 1142
                         $newNodes[] = $targetSubClass;
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
             $this->addToIdentityMap($entity);
1185 1185
         }
1186 1186
 
1187
-        if (! ($entity instanceof NotifyPropertyChanged)) {
1187
+        if ( ! ($entity instanceof NotifyPropertyChanged)) {
1188 1188
             return;
1189 1189
         }
1190 1190
 
@@ -1214,7 +1214,7 @@  discard block
 block discarded – undo
1214 1214
     {
1215 1215
         $oid = spl_object_id($entity);
1216 1216
 
1217
-        if (! isset($this->entityIdentifiers[$oid])) {
1217
+        if ( ! isset($this->entityIdentifiers[$oid])) {
1218 1218
             throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update');
1219 1219
         }
1220 1220
 
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
             return; // entity has not been persisted yet, so nothing more to do.
1301 1301
         }
1302 1302
 
1303
-        if (! $this->isInIdentityMap($entity)) {
1303
+        if ( ! $this->isInIdentityMap($entity)) {
1304 1304
             return;
1305 1305
         }
1306 1306
 
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
         $persister = $this->getEntityPersister($class->getClassName());
1413 1413
         $id        = $persister->getIdentifier($entity);
1414 1414
 
1415
-        if (! $id) {
1415
+        if ( ! $id) {
1416 1416
             return self::STATE_NEW;
1417 1417
         }
1418 1418
 
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
         $class = $this->em->getClassMetadata(get_class($entity));
1773 1773
 
1774 1774
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1775
-            if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) {
1775
+            if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) {
1776 1776
                 continue;
1777 1777
             }
1778 1778
 
@@ -1819,7 +1819,7 @@  discard block
 block discarded – undo
1819 1819
         }
1820 1820
 
1821 1821
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1822
-            if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) {
1822
+            if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) {
1823 1823
                 continue;
1824 1824
             }
1825 1825
 
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
 
1836 1836
                 case ($relatedEntities instanceof Collection):
1837 1837
                 case (is_array($relatedEntities)):
1838
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
1838
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
1839 1839
                         throw ORMInvalidArgumentException::invalidAssociation(
1840 1840
                             $this->em->getClassMetadata($targetEntity),
1841 1841
                             $association,
@@ -1850,7 +1850,7 @@  discard block
 block discarded – undo
1850 1850
                     break;
1851 1851
 
1852 1852
                 case ($relatedEntities !== null):
1853
-                    if (! $relatedEntities instanceof $targetEntity) {
1853
+                    if ( ! $relatedEntities instanceof $targetEntity) {
1854 1854
                         throw ORMInvalidArgumentException::invalidAssociation(
1855 1855
                             $this->em->getClassMetadata($targetEntity),
1856 1856
                             $association,
@@ -1879,7 +1879,7 @@  discard block
 block discarded – undo
1879 1879
         $class             = $this->em->getClassMetadata(get_class($entity));
1880 1880
 
1881 1881
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1882
-            if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) {
1882
+            if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) {
1883 1883
                 continue;
1884 1884
             }
1885 1885
 
@@ -1938,7 +1938,7 @@  discard block
 block discarded – undo
1938 1938
 
1939 1939
         switch (true) {
1940 1940
             case $lockMode === LockMode::OPTIMISTIC:
1941
-                if (! $class->isVersioned()) {
1941
+                if ( ! $class->isVersioned()) {
1942 1942
                     throw OptimisticLockException::notVersioned($class->getClassName());
1943 1943
                 }
1944 1944
 
@@ -1961,7 +1961,7 @@  discard block
 block discarded – undo
1961 1961
             case $lockMode === LockMode::NONE:
1962 1962
             case $lockMode === LockMode::PESSIMISTIC_READ:
1963 1963
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
1964
-                if (! $this->em->getConnection()->isTransactionActive()) {
1964
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
1965 1965
                     throw TransactionRequiredException::transactionRequired();
1966 1966
                 }
1967 1967
 
@@ -2120,7 +2120,7 @@  discard block
 block discarded – undo
2120 2120
                     $entity->addPropertyChangedListener($this);
2121 2121
                 }
2122 2122
             } else {
2123
-                if (! isset($hints[Query::HINT_REFRESH])
2123
+                if ( ! isset($hints[Query::HINT_REFRESH])
2124 2124
                     || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) {
2125 2125
                     return $entity;
2126 2126
                 }
@@ -2150,7 +2150,7 @@  discard block
 block discarded – undo
2150 2150
         foreach ($data as $field => $value) {
2151 2151
             $property = $class->getProperty($field);
2152 2152
 
2153
-            if (! ($property instanceof FieldMetadata)) {
2153
+            if ( ! ($property instanceof FieldMetadata)) {
2154 2154
                 continue;
2155 2155
             }
2156 2156
 
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
         }
2171 2171
 
2172 2172
         foreach ($class->getDeclaredPropertiesIterator() as $field => $association) {
2173
-            if (! ($association instanceof AssociationMetadata)) {
2173
+            if ( ! ($association instanceof AssociationMetadata)) {
2174 2174
                 continue;
2175 2175
             }
2176 2176
 
@@ -2219,7 +2219,7 @@  discard block
 block discarded – undo
2219 2219
                 continue;
2220 2220
             }
2221 2221
 
2222
-            if (! $association->isOwningSide()) {
2222
+            if ( ! $association->isOwningSide()) {
2223 2223
                 // use the given entity association
2224 2224
                 if (isset($data[$field]) && is_object($data[$field]) &&
2225 2225
                     isset($this->entityStates[spl_object_id($data[$field])])) {
@@ -2269,7 +2269,7 @@  discard block
 block discarded – undo
2269 2269
                 $associatedId[$targetField] = $joinColumnValue;
2270 2270
             }
2271 2271
 
2272
-            if (! $associatedId) {
2272
+            if ( ! $associatedId) {
2273 2273
                 // Foreign key is NULL
2274 2274
                 $association->setValue($entity, null);
2275 2275
                 $this->originalEntityData[$oid][$field] = null;
@@ -2278,7 +2278,7 @@  discard block
 block discarded – undo
2278 2278
             }
2279 2279
 
2280 2280
             // @todo guilhermeblanco Can we remove the need of this somehow?
2281
-            if (! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2281
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2282 2282
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2283 2283
             }
2284 2284
 
@@ -2295,7 +2295,7 @@  discard block
 block discarded – undo
2295 2295
                     // If this is an uninitialized proxy, we are deferring eager loads,
2296 2296
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2297 2297
                     // then we can append this entity for eager loading!
2298
-                    if (! $targetClass->isIdentifierComposite() &&
2298
+                    if ( ! $targetClass->isIdentifierComposite() &&
2299 2299
                         $newValue instanceof GhostObjectInterface &&
2300 2300
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2301 2301
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2355,7 +2355,7 @@  discard block
 block discarded – undo
2355 2355
             $this->originalEntityData[$oid][$field] = $newValue;
2356 2356
             $association->setValue($entity, $newValue);
2357 2357
 
2358
-            if (! $association->getInversedBy()
2358
+            if ( ! $association->getInversedBy()
2359 2359
                 || ! ($association instanceof OneToOneAssociationMetadata)
2360 2360
                 // @TODO refactor this
2361 2361
                 // we don't want to set any values in un-initialized proxies
@@ -2380,7 +2380,7 @@  discard block
 block discarded – undo
2380 2380
 
2381 2381
     public function triggerEagerLoads()
2382 2382
     {
2383
-        if (! $this->eagerLoadingEntities) {
2383
+        if ( ! $this->eagerLoadingEntities) {
2384 2384
             return;
2385 2385
         }
2386 2386
 
@@ -2389,7 +2389,7 @@  discard block
 block discarded – undo
2389 2389
         $this->eagerLoadingEntities = [];
2390 2390
 
2391 2391
         foreach ($eagerLoadingEntities as $entityName => $ids) {
2392
-            if (! $ids) {
2392
+            if ( ! $ids) {
2393 2393
                 continue;
2394 2394
             }
2395 2395
 
@@ -2657,7 +2657,7 @@  discard block
 block discarded – undo
2657 2657
 
2658 2658
         $this->addToIdentityMap($entity);
2659 2659
 
2660
-        if (! ($entity instanceof NotifyPropertyChanged) || $isProxy) {
2660
+        if ( ! ($entity instanceof NotifyPropertyChanged) || $isProxy) {
2661 2661
             return;
2662 2662
         }
2663 2663
 
@@ -2689,7 +2689,7 @@  discard block
 block discarded – undo
2689 2689
     {
2690 2690
         $class = $this->em->getClassMetadata(get_class($entity));
2691 2691
 
2692
-        if (! $class->getProperty($propertyName)) {
2692
+        if ( ! $class->getProperty($propertyName)) {
2693 2693
             return; // ignore non-persistent fields
2694 2694
         }
2695 2695
 
@@ -2768,7 +2768,7 @@  discard block
 block discarded – undo
2768 2768
             return;
2769 2769
         }
2770 2770
 
2771
-        if (! ($obj instanceof PersistentCollection)) {
2771
+        if ( ! ($obj instanceof PersistentCollection)) {
2772 2772
             return;
2773 2773
         }
2774 2774
 
@@ -2784,7 +2784,7 @@  discard block
 block discarded – undo
2784 2784
      */
2785 2785
     private static function objToStr($obj)
2786 2786
     {
2787
-        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj);
2787
+        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj);
2788 2788
     }
2789 2789
 
2790 2790
     /**
@@ -2799,7 +2799,7 @@  discard block
 block discarded – undo
2799 2799
      */
2800 2800
     public function markReadOnly($object)
2801 2801
     {
2802
-        if (! is_object($object) || ! $this->isInIdentityMap($object)) {
2802
+        if ( ! is_object($object) || ! $this->isInIdentityMap($object)) {
2803 2803
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2804 2804
         }
2805 2805
 
@@ -2817,7 +2817,7 @@  discard block
 block discarded – undo
2817 2817
      */
2818 2818
     public function isReadOnly($object)
2819 2819
     {
2820
-        if (! is_object($object)) {
2820
+        if ( ! is_object($object)) {
2821 2821
             throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
2822 2822
         }
2823 2823
 
@@ -2829,7 +2829,7 @@  discard block
 block discarded – undo
2829 2829
      */
2830 2830
     private function afterTransactionComplete()
2831 2831
     {
2832
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2832
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2833 2833
             $persister->afterTransactionComplete();
2834 2834
         });
2835 2835
     }
@@ -2839,7 +2839,7 @@  discard block
 block discarded – undo
2839 2839
      */
2840 2840
     private function afterTransactionRolledBack()
2841 2841
     {
2842
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2842
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2843 2843
             $persister->afterTransactionRolledBack();
2844 2844
         });
2845 2845
     }
@@ -2849,12 +2849,12 @@  discard block
 block discarded – undo
2849 2849
      */
2850 2850
     private function performCallbackOnCachedPersister(callable $callback)
2851 2851
     {
2852
-        if (! $this->hasCache) {
2852
+        if ( ! $this->hasCache) {
2853 2853
             return;
2854 2854
         }
2855 2855
 
2856 2856
         foreach (array_merge($this->entityPersisters, $this->collectionPersisters) as $persister) {
2857
-            if (! ($persister instanceof CachedPersister)) {
2857
+            if ( ! ($persister instanceof CachedPersister)) {
2858 2858
                 continue;
2859 2859
             }
2860 2860
 
@@ -2864,7 +2864,7 @@  discard block
 block discarded – undo
2864 2864
 
2865 2865
     private function dispatchOnFlushEvent()
2866 2866
     {
2867
-        if (! $this->eventManager->hasListeners(Events::onFlush)) {
2867
+        if ( ! $this->eventManager->hasListeners(Events::onFlush)) {
2868 2868
             return;
2869 2869
         }
2870 2870
 
@@ -2873,7 +2873,7 @@  discard block
 block discarded – undo
2873 2873
 
2874 2874
     private function dispatchPostFlushEvent()
2875 2875
     {
2876
-        if (! $this->eventManager->hasListeners(Events::postFlush)) {
2876
+        if ( ! $this->eventManager->hasListeners(Events::postFlush)) {
2877 2877
             return;
2878 2878
         }
2879 2879
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Event/ListenersInvoker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
             }
94 94
         }
95 95
 
96
-        if (! ($invoke & self::INVOKE_MANAGER)) {
96
+        if ( ! ($invoke & self::INVOKE_MANAGER)) {
97 97
             return;
98 98
         }
99 99
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/QueryBuilder.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
     {
415 415
         $aliases = $this->getRootAliases();
416 416
 
417
-        if (! isset($aliases[0])) {
417
+        if ( ! isset($aliases[0])) {
418 418
             throw new \RuntimeException('No alias was set before invoking getRootAlias().');
419 419
         }
420 420
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
     public function getParameter($key)
598 598
     {
599 599
         $filteredParameters = $this->parameters->filter(
600
-            function (Query\Parameter $parameter) use ($key) : bool {
600
+            function(Query\Parameter $parameter) use ($key) : bool {
601 601
                 $parameterName = $parameter->getName();
602 602
 
603 603
                 return $key === $parameterName || (string) $key === (string) $parameterName;
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
     {
674 674
         if ($append && ($dqlPartName === 'where' || $dqlPartName === 'having')) {
675 675
             throw new \InvalidArgumentException(
676
-                "Using \$append = true does not have an effect with 'where' or 'having' " .
676
+                "Using \$append = true does not have an effect with 'where' or 'having' ".
677 677
                 'parts. See QueryBuilder#andWhere() for an example for correct usage.'
678 678
             );
679 679
         }
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
     {
815 815
         $this->type = self::DELETE;
816 816
 
817
-        if (! $delete) {
817
+        if ( ! $delete) {
818 818
             return $this;
819 819
         }
820 820
 
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
     {
842 842
         $this->type = self::UPDATE;
843 843
 
844
-        if (! $update) {
844
+        if ( ! $update) {
845 845
             return $this;
846 846
         }
847 847
 
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
     {
897 897
         $rootAliases = $this->getRootAliases();
898 898
 
899
-        if (! in_array($alias, $rootAliases, true)) {
899
+        if ( ! in_array($alias, $rootAliases, true)) {
900 900
             throw new Query\QueryException(
901 901
                 sprintf('Specified root alias %s must be set before invoking indexBy().', $alias)
902 902
             );
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
      */
1058 1058
     public function where($predicates)
1059 1059
     {
1060
-        if (! (func_num_args() === 1 && $predicates instanceof Expr\Composite)) {
1060
+        if ( ! (func_num_args() === 1 && $predicates instanceof Expr\Composite)) {
1061 1061
             $predicates = new Expr\Andx(func_get_args());
1062 1062
         }
1063 1063
 
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
      */
1177 1177
     public function having($having)
1178 1178
     {
1179
-        if (! (func_num_args() === 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) {
1179
+        if ( ! (func_num_args() === 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) {
1180 1180
             $having = new Expr\Andx(func_get_args());
1181 1181
         }
1182 1182
 
@@ -1274,7 +1274,7 @@  discard block
 block discarded – undo
1274 1274
     public function addCriteria(Criteria $criteria)
1275 1275
     {
1276 1276
         $allAliases = $this->getAllAliases();
1277
-        if (! isset($allAliases[0])) {
1277
+        if ( ! isset($allAliases[0])) {
1278 1278
             throw new Query\QueryException('No aliases are set before invoking addCriteria().');
1279 1279
         }
1280 1280
 
@@ -1292,14 +1292,14 @@  discard block
 block discarded – undo
1292 1292
             foreach ($criteria->getOrderings() as $sort => $order) {
1293 1293
                 $hasValidAlias = false;
1294 1294
                 foreach ($allAliases as $alias) {
1295
-                    if (strpos($sort . '.', $alias . '.') === 0) {
1295
+                    if (strpos($sort.'.', $alias.'.') === 0) {
1296 1296
                         $hasValidAlias = true;
1297 1297
                         break;
1298 1298
                     }
1299 1299
                 }
1300 1300
 
1301
-                if (! $hasValidAlias) {
1302
-                    $sort = $allAliases[0] . '.' . $sort;
1301
+                if ( ! $hasValidAlias) {
1302
+                    $sort = $allAliases[0].'.'.$sort;
1303 1303
                 }
1304 1304
 
1305 1305
                 $this->addOrderBy($sort, $order);
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
     private function getDQLForSelect()
1374 1374
     {
1375 1375
         $dql = 'SELECT'
1376
-             . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '')
1376
+             . ($this->dqlParts['distinct'] === true ? ' DISTINCT' : '')
1377 1377
              . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']);
1378 1378
 
1379 1379
         $fromParts   = $this->getDQLPart('from');
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
         $fromClauses = [];
1382 1382
 
1383 1383
         // Loop through all FROM clauses
1384
-        if (! empty($fromParts)) {
1384
+        if ( ! empty($fromParts)) {
1385 1385
             $dql .= ' FROM ';
1386 1386
 
1387 1387
             foreach ($fromParts as $from) {
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
 
1390 1390
                 if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) {
1391 1391
                     foreach ($joinParts[$from->getAlias()] as $join) {
1392
-                        $fromClause .= ' ' . ((string) $join);
1392
+                        $fromClause .= ' '.((string) $join);
1393 1393
                     }
1394 1394
                 }
1395 1395
 
@@ -1478,7 +1478,7 @@  discard block
 block discarded – undo
1478 1478
         foreach ($this->dqlParts as $part => $elements) {
1479 1479
             if (is_array($this->dqlParts[$part])) {
1480 1480
                 foreach ($this->dqlParts[$part] as $idx => $element) {
1481
-                    if (! is_object($element)) {
1481
+                    if ( ! is_object($element)) {
1482 1482
                         continue;
1483 1483
                     }
1484 1484
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
68 68
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $updateClause->aliasIdentificationVariable);
69 69
 
70
-        $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')'
71
-                . ' SELECT i0.' . implode(', i0.', array_keys($idColumns));
70
+        $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')'
71
+                . ' SELECT i0.'.implode(', i0.', array_keys($idColumns));
72 72
 
73 73
         $rangeDecl  = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $updateClause->aliasIdentificationVariable);
74 74
         $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         // 3. Create and store UPDATE statements
87 87
         $hierarchyClasses = array_merge(
88 88
             array_map(
89
-                function ($className) use ($em) {
89
+                function($className) use ($em) {
90 90
                     return $em->getClassMetadata($className);
91 91
                 },
92 92
                 array_reverse($primaryClass->getSubClasses())
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
                 $field    = $updateItem->pathExpression->field;
105 105
                 $property = $class->getProperty($field);
106 106
 
107
-                if (! $property || $class->isInheritedProperty($field)) {
107
+                if ( ! $property || $class->isInheritedProperty($field)) {
108 108
                     continue;
109 109
                 }
110 110
 
111 111
                 $updateSQLParts[] = $sqlWalker->walkUpdateItem($updateItem);
112 112
                 $newValue         = $updateItem->newValue;
113 113
 
114
-                if (! ($newValue instanceof AST\InputParameter)) {
114
+                if ( ! ($newValue instanceof AST\InputParameter)) {
115 115
                     continue;
116 116
                 }
117 117
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 ++$this->numParametersInUpdateClause;
121 121
             }
122 122
 
123
-            if (! $updateSQLParts) {
123
+            if ( ! $updateSQLParts) {
124 124
                 continue;
125 125
             }
126 126
 
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
             ];
149 149
         }
150 150
 
151
-        $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
152
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
151
+        $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
152
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
153 153
 
154 154
         $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
155 155
     }
Please login to merge, or discard this patch.