Failed Conditions
Pull Request — master (#7242)
by Gabriel
08:46
created
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/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.
lib/Doctrine/ORM/Query/TreeWalkerChainIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
      */
111 111
     public function offsetUnset($offset)
112 112
     {
113
-        if (! $this->offsetExists($offset)) {
113
+        if ( ! $this->offsetExists($offset)) {
114 114
             return;
115 115
         }
116 116
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 1 patch
Spacing   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
      */
275 275
     public function getSQLTableAlias($tableName, $dqlAlias = '')
276 276
     {
277
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
277
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
278 278
 
279
-        if (! isset($this->tableAliasMap[$tableName])) {
280
-            $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++;
279
+        if ( ! isset($this->tableAliasMap[$tableName])) {
280
+            $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++;
281 281
         }
282 282
 
283 283
         return $this->tableAliasMap[$tableName];
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      */
296 296
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
297 297
     {
298
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
298
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
299 299
 
300 300
         $this->tableAliasMap[$tableName] = $alias;
301 301
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function getSQLColumnAlias()
311 311
     {
312
-        return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++);
312
+        return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++);
313 313
     }
314 314
 
315 315
     /**
@@ -336,14 +336,14 @@  discard block
 block discarded – undo
336 336
 
337 337
             // If this is a joined association we must use left joins to preserve the correct result.
338 338
             $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
339
-            $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
339
+            $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON ';
340 340
 
341 341
             $sqlParts = [];
342 342
 
343 343
             foreach ($class->getIdentifierColumns($this->em) as $column) {
344 344
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
345 345
 
346
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
346
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
347 347
             }
348 348
 
349 349
             $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias);
@@ -367,14 +367,14 @@  discard block
 block discarded – undo
367 367
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
368 368
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
369 369
 
370
-            $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
370
+            $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
371 371
 
372 372
             $sqlParts = [];
373 373
 
374 374
             foreach ($subClass->getIdentifierColumns($this->em) as $column) {
375 375
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
376 376
 
377
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
377
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
378 378
             }
379 379
 
380 380
             $sql .= implode(' AND ', $sqlParts);
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
             $qComp       = $this->queryComponents[$dqlAlias];
396 396
             $association = $qComp['relation'];
397 397
 
398
-            if (! ($association instanceof ToManyAssociationMetadata)) {
398
+            if ( ! ($association instanceof ToManyAssociationMetadata)) {
399 399
                 continue;
400 400
             }
401 401
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
                 $property      = $qComp['metadata']->getProperty($fieldName);
404 404
                 $tableName     = $property->getTableName();
405 405
                 $columnName    = $this->platform->quoteIdentifier($property->getColumnName());
406
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
406
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
407 407
 
408 408
                 // OrderByClause should replace an ordered relation. see - DDC-2475
409 409
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
                 }
412 412
 
413 413
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
414
-                $orderedColumns[]                        = $orderedColumn . ' ' . $orientation;
414
+                $orderedColumns[]                        = $orderedColumn.' '.$orientation;
415 415
             }
416 416
         }
417 417
 
@@ -451,19 +451,19 @@  discard block
 block discarded – undo
451 451
             $discrColumnType  = $discrColumn->getType();
452 452
             $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
453 453
             $sqlTableAlias    = ($this->useSqlTableAliases)
454
-                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
454
+                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
455 455
                 : '';
456 456
 
457 457
             $sqlParts[] = sprintf(
458 458
                 '%s IN (%s)',
459
-                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
459
+                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
460 460
                 implode(', ', $values)
461 461
             );
462 462
         }
463 463
 
464 464
         $sql = implode(' AND ', $sqlParts);
465 465
 
466
-        return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql;
466
+        return isset($sqlParts[1]) ? '('.$sql.')' : $sql;
467 467
     }
468 468
 
469 469
     /**
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
      */
477 477
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
478 478
     {
479
-        if (! $this->em->hasFilters()) {
479
+        if ( ! $this->em->hasFilters()) {
480 480
             return '';
481 481
         }
482 482
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
                 continue;
513 513
             }
514 514
 
515
-            $filterClauses[] = '(' . $filterExpr . ')';
515
+            $filterClauses[] = '('.$filterExpr.')';
516 516
         }
517 517
 
518 518
         return implode(' AND ', $filterClauses);
@@ -542,11 +542,11 @@  discard block
 block discarded – undo
542 542
             $sql .= $this->walkOrderByClause($AST->orderByClause);
543 543
         }
544 544
 
545
-        if (! $AST->orderByClause) {
545
+        if ( ! $AST->orderByClause) {
546 546
             $orderBySql = $this->generateOrderedCollectionOrderByItems();
547 547
 
548 548
             if ($orderBySql) {
549
-                $sql .= ' ORDER BY ' . $orderBySql;
549
+                $sql .= ' ORDER BY '.$orderBySql;
550 550
             }
551 551
         }
552 552
 
@@ -559,11 +559,11 @@  discard block
 block discarded – undo
559 559
         }
560 560
 
561 561
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
562
-            return $sql . ' ' . $this->platform->getReadLockSQL();
562
+            return $sql.' '.$this->platform->getReadLockSQL();
563 563
         }
564 564
 
565 565
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
566
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
566
+            return $sql.' '.$this->platform->getWriteLockSQL();
567 567
         }
568 568
 
569 569
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         }
572 572
 
573 573
         foreach ($this->selectedClasses as $selectedClass) {
574
-            if (! $selectedClass['class']->isVersioned()) {
574
+            if ( ! $selectedClass['class']->isVersioned()) {
575 575
                 throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName());
576 576
             }
577 577
         }
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
         foreach ($class->getIdentifierColumns($this->em) as $column) {
621 621
             $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
622 622
 
623
-            $sqlParts[] = $tableAlias . '.' . $quotedColumnName;
623
+            $sqlParts[] = $tableAlias.'.'.$quotedColumnName;
624 624
         }
625 625
 
626 626
         return implode(', ', $sqlParts);
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
     {
639 639
         $class = $this->queryComponents[$identificationVariable]['metadata'];
640 640
 
641
-        if (! $fieldName) {
641
+        if ( ! $fieldName) {
642 642
             return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
643 643
         }
644 644
 
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
                 $property  = $class->getProperty($fieldName);
668 668
 
669 669
                 if ($this->useSqlTableAliases) {
670
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
670
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
671 671
                 }
672 672
 
673 673
                 $sql .= $this->platform->quoteIdentifier($property->getColumnName());
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
                 $class       = $this->queryComponents[$dqlAlias]['metadata'];
682 682
                 $association = $class->getProperty($fieldName);
683 683
 
684
-                if (! $association->isOwningSide()) {
684
+                if ( ! $association->isOwningSide()) {
685 685
                     throw QueryException::associationPathInverseSideNotSupported($pathExpr);
686 686
                 }
687 687
 
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
                 $joinColumn = reset($joinColumns);
696 696
 
697 697
                 if ($this->useSqlTableAliases) {
698
-                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.';
698
+                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.';
699 699
                 }
700 700
 
701 701
                 $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName());
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
      */
714 714
     public function walkSelectClause($selectClause)
715 715
     {
716
-        $sql                  = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
716
+        $sql                  = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
717 717
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
718 718
 
719 719
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) {
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
 
757 757
                 $sqlSelectExpressions[] = sprintf(
758 758
                     '%s AS %s',
759
-                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform),
759
+                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform),
760 760
                     $sqlColumnAlias
761 761
                 );
762 762
 
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 
767 767
             // Add foreign key columns of class and also parent classes
768 768
             foreach ($class->getDeclaredPropertiesIterator() as $association) {
769
-                if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
769
+                if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
770 770
                     || ( ! $addMetaColumns && ! $association->isPrimaryKey())) {
771 771
                     continue;
772 772
                 }
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
                     $columnAlias          = $this->getSQLColumnAlias();
782 782
                     $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
783 783
 
784
-                    if (! $joinColumn->getType()) {
784
+                    if ( ! $joinColumn->getType()) {
785 785
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
786 786
                     }
787 787
 
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
             }
798 798
 
799 799
             // Add foreign key columns to SQL, if necessary
800
-            if (! $addMetaColumns) {
800
+            if ( ! $addMetaColumns) {
801 801
                 continue;
802 802
             }
803 803
 
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
                         continue;
812 812
                     }
813 813
 
814
-                    if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
814
+                    if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
815 815
                         continue;
816 816
                     }
817 817
 
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
                         $columnAlias          = $this->getSQLColumnAlias();
826 826
                         $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
827 827
 
828
-                        if (! $joinColumn->getType()) {
828
+                        if ( ! $joinColumn->getType()) {
829 829
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
830 830
                         }
831 831
 
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
860 860
         }
861 861
 
862
-        return ' FROM ' . implode(', ', $sqlParts);
862
+        return ' FROM '.implode(', ', $sqlParts);
863 863
     }
864 864
 
865 865
     /**
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
         $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
935 935
 
936 936
         $sql = $this->platform->appendLockHint(
937
-            $tableName . ' ' . $tableAlias,
937
+            $tableName.' '.$tableAlias,
938 938
             $this->query->getHint(Query::HINT_LOCK_MODE)
939 939
         );
940 940
 
@@ -944,11 +944,11 @@  discard block
 block discarded – undo
944 944
 
945 945
         $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias);
946 946
 
947
-        if (! $buildNestedJoins) {
948
-            return $sql . $classTableInheritanceJoins;
947
+        if ( ! $buildNestedJoins) {
948
+            return $sql.$classTableInheritanceJoins;
949 949
         }
950 950
 
951
-        return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')';
951
+        return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')';
952 952
     }
953 953
 
954 954
     /**
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
         ;
986 986
 
987 987
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true &&
988
-            (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
988
+            ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
989 989
             if ($association instanceof ToManyAssociationMetadata) {
990 990
                 throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation);
991 991
             }
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
             }
1040 1040
 
1041 1041
             $targetTableJoin = [
1042
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1042
+                'table' => $targetTableName.' '.$targetTableAlias,
1043 1043
                 'condition' => implode(' AND ', $conditions),
1044 1044
             ];
1045 1045
         } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) {
@@ -1067,7 +1067,7 @@  discard block
 block discarded – undo
1067 1067
                 );
1068 1068
             }
1069 1069
 
1070
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1070
+            $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1071 1071
 
1072 1072
             // Join target table
1073 1073
             $sql .= ($joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
             }
1107 1107
 
1108 1108
             $targetTableJoin = [
1109
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1109
+                'table' => $targetTableName.' '.$targetTableAlias,
1110 1110
                 'condition' => implode(' AND ', $conditions),
1111 1111
             ];
1112 1112
         } else {
@@ -1114,23 +1114,23 @@  discard block
 block discarded – undo
1114 1114
         }
1115 1115
 
1116 1116
         // Handle WITH clause
1117
-        $withCondition = ($condExpr === null) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1117
+        $withCondition = ($condExpr === null) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1118 1118
 
1119 1119
         if ($targetClass->inheritanceType === InheritanceType::JOINED) {
1120 1120
             $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1121 1121
 
1122 1122
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1123 1123
             if ($withCondition) {
1124
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1124
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1125 1125
             } else {
1126
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1126
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1127 1127
             }
1128 1128
         } else {
1129
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1129
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1130 1130
         }
1131 1131
 
1132 1132
         if ($withCondition) {
1133
-            $sql .= ' AND ' . $withCondition;
1133
+            $sql .= ' AND '.$withCondition;
1134 1134
         }
1135 1135
 
1136 1136
         // Apply the indexes
@@ -1164,7 +1164,7 @@  discard block
 block discarded – undo
1164 1164
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1165 1165
         }
1166 1166
 
1167
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1167
+        return ' ORDER BY '.implode(', ', $orderByItems);
1168 1168
     }
1169 1169
 
1170 1170
     /**
@@ -1181,10 +1181,10 @@  discard block
 block discarded – undo
1181 1181
         $this->orderedColumnsMap[$sql] = $type;
1182 1182
 
1183 1183
         if ($expr instanceof AST\Subselect) {
1184
-            return '(' . $sql . ') ' . $type;
1184
+            return '('.$sql.') '.$type;
1185 1185
         }
1186 1186
 
1187
-        return $sql . ' ' . $type;
1187
+        return $sql.' '.$type;
1188 1188
     }
1189 1189
 
1190 1190
     /**
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
      */
1193 1193
     public function walkHavingClause($havingClause)
1194 1194
     {
1195
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1195
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1196 1196
     }
1197 1197
 
1198 1198
     /**
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
                 $conditions = [];
1216 1216
 
1217 1217
                 if ($join->conditionalExpression) {
1218
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1218
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1219 1219
                 }
1220 1220
 
1221 1221
                 $isUnconditionalJoin = empty($conditions);
@@ -1240,7 +1240,7 @@  discard block
 block discarded – undo
1240 1240
                 }
1241 1241
 
1242 1242
                 if ($conditions) {
1243
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1243
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1244 1244
                 }
1245 1245
 
1246 1246
                 break;
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1271 1271
         }
1272 1272
 
1273
-        $sql .= implode(', ', $scalarExpressions) . ')';
1273
+        $sql .= implode(', ', $scalarExpressions).')';
1274 1274
 
1275 1275
         return $sql;
1276 1276
     }
@@ -1292,7 +1292,7 @@  discard block
 block discarded – undo
1292 1292
             ? $this->conn->quote($nullIfExpression->secondExpression)
1293 1293
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1294 1294
 
1295
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1295
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1296 1296
     }
1297 1297
 
1298 1298
     /**
@@ -1305,11 +1305,11 @@  discard block
 block discarded – undo
1305 1305
         $sql = 'CASE';
1306 1306
 
1307 1307
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1308
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1309
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1308
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1309
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1310 1310
         }
1311 1311
 
1312
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1312
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1313 1313
 
1314 1314
         return $sql;
1315 1315
     }
@@ -1323,14 +1323,14 @@  discard block
 block discarded – undo
1323 1323
      */
1324 1324
     public function walkSimpleCaseExpression($simpleCaseExpression)
1325 1325
     {
1326
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1326
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1327 1327
 
1328 1328
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1329
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1330
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1329
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1330
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1331 1331
         }
1332 1332
 
1333
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1333
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1334 1334
 
1335 1335
         return $sql;
1336 1336
     }
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
 
1372 1372
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1373 1373
 
1374
-                if (! $hidden) {
1374
+                if ( ! $hidden) {
1375 1375
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType());
1376 1376
                     $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias;
1377 1377
                 }
@@ -1392,11 +1392,11 @@  discard block
 block discarded – undo
1392 1392
                 $columnAlias = $this->getSQLColumnAlias();
1393 1393
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1394 1394
 
1395
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1395
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1396 1396
 
1397 1397
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1398 1398
 
1399
-                if (! $hidden) {
1399
+                if ( ! $hidden) {
1400 1400
                     // Conceptually we could resolve field type here by traverse through AST to retrieve field type,
1401 1401
                     // but this is not a feasible solution; assume 'string'.
1402 1402
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
@@ -1407,11 +1407,11 @@  discard block
 block discarded – undo
1407 1407
                 $columnAlias = $this->getSQLColumnAlias();
1408 1408
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1409 1409
 
1410
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1410
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1411 1411
 
1412 1412
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1413 1413
 
1414
-                if (! $hidden) {
1414
+                if ( ! $hidden) {
1415 1415
                     // We cannot resolve field type here; assume 'string'.
1416 1416
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
1417 1417
                 }
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
                 $class       = $queryComp['metadata'];
1436 1436
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: null;
1437 1437
 
1438
-                if (! isset($this->selectedClasses[$dqlAlias])) {
1438
+                if ( ! isset($this->selectedClasses[$dqlAlias])) {
1439 1439
                     $this->selectedClasses[$dqlAlias] = [
1440 1440
                         'class'       => $class,
1441 1441
                         'dqlAlias'    => $dqlAlias,
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
 
1448 1448
                 // Select all fields from the queried class
1449 1449
                 foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
1450
-                    if (! ($property instanceof FieldMetadata)) {
1450
+                    if ( ! ($property instanceof FieldMetadata)) {
1451 1451
                         continue;
1452 1452
                     }
1453 1453
 
@@ -1482,7 +1482,7 @@  discard block
 block discarded – undo
1482 1482
                         $subClass = $this->em->getClassMetadata($subClassName);
1483 1483
 
1484 1484
                         foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) {
1485
-                            if (! ($property instanceof FieldMetadata)) {
1485
+                            if ( ! ($property instanceof FieldMetadata)) {
1486 1486
                                 continue;
1487 1487
                             }
1488 1488
 
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
      */
1522 1522
     public function walkQuantifiedExpression($qExpr)
1523 1523
     {
1524
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1524
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1525 1525
     }
1526 1526
 
1527 1527
     /**
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1562 1562
         }
1563 1563
 
1564
-        return ' FROM ' . implode(', ', $sqlParts);
1564
+        return ' FROM '.implode(', ', $sqlParts);
1565 1565
     }
1566 1566
 
1567 1567
     /**
@@ -1569,7 +1569,7 @@  discard block
 block discarded – undo
1569 1569
      */
1570 1570
     public function walkSimpleSelectClause($simpleSelectClause)
1571 1571
     {
1572
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1572
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1573 1573
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1574 1574
     }
1575 1575
 
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
                     break;
1603 1603
 
1604 1604
                 case ($e instanceof AST\Subselect):
1605
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1605
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1606 1606
                     break;
1607 1607
 
1608 1608
                 case ($e instanceof AST\PathExpression):
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
                     $class     = $qComp['metadata'];
1612 1612
                     $fieldType = $class->getProperty($e->field)->getType();
1613 1613
 
1614
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1614
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1615 1615
                     break;
1616 1616
 
1617 1617
                 case ($e instanceof AST\Literal):
@@ -1625,11 +1625,11 @@  discard block
 block discarded – undo
1625 1625
                             break;
1626 1626
                     }
1627 1627
 
1628
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1628
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1629 1629
                     break;
1630 1630
 
1631 1631
                 default:
1632
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1632
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1633 1633
                     break;
1634 1634
             }
1635 1635
 
@@ -1662,10 +1662,10 @@  discard block
 block discarded – undo
1662 1662
             case ($expr instanceof AST\Subselect):
1663 1663
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1664 1664
 
1665
-                $columnAlias                        = 'sclr' . $this->aliasCounter++;
1665
+                $columnAlias                        = 'sclr'.$this->aliasCounter++;
1666 1666
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1667 1667
 
1668
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1668
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1669 1669
                 break;
1670 1670
 
1671 1671
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1682,7 +1682,7 @@  discard block
 block discarded – undo
1682 1682
                 $columnAlias                        = $this->getSQLColumnAlias();
1683 1683
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1684 1684
 
1685
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1685
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1686 1686
                 break;
1687 1687
 
1688 1688
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1702,8 +1702,8 @@  discard block
 block discarded – undo
1702 1702
      */
1703 1703
     public function walkAggregateExpression($aggExpression)
1704 1704
     {
1705
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1706
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1705
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1706
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1707 1707
     }
1708 1708
 
1709 1709
     /**
@@ -1717,7 +1717,7 @@  discard block
 block discarded – undo
1717 1717
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1718 1718
         }
1719 1719
 
1720
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1720
+        return ' GROUP BY '.implode(', ', $sqlParts);
1721 1721
     }
1722 1722
 
1723 1723
     /**
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
     public function walkGroupByItem($groupByItem)
1727 1727
     {
1728 1728
         // StateFieldPathExpression
1729
-        if (! is_string($groupByItem)) {
1729
+        if ( ! is_string($groupByItem)) {
1730 1730
             return $this->walkPathExpression($groupByItem);
1731 1731
         }
1732 1732
 
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
     {
1781 1781
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1782 1782
         $tableName = $class->getTableName();
1783
-        $sql       = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform);
1783
+        $sql       = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform);
1784 1784
 
1785 1785
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1786 1786
 
@@ -1796,12 +1796,12 @@  discard block
 block discarded – undo
1796 1796
     {
1797 1797
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1798 1798
         $tableName = $class->getTableName();
1799
-        $sql       = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform);
1799
+        $sql       = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform);
1800 1800
 
1801 1801
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1802 1802
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1803 1803
 
1804
-        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1804
+        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1805 1805
 
1806 1806
         return $sql;
1807 1807
     }
@@ -1814,7 +1814,7 @@  discard block
 block discarded – undo
1814 1814
         $useTableAliasesBefore    = $this->useSqlTableAliases;
1815 1815
         $this->useSqlTableAliases = false;
1816 1816
 
1817
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1817
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1818 1818
         $newValue = $updateItem->newValue;
1819 1819
 
1820 1820
         switch (true) {
@@ -1851,7 +1851,7 @@  discard block
 block discarded – undo
1851 1851
                 $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1852 1852
                 $filterExpr = $this->generateFilterConditionSQL($class, $tableAlias);
1853 1853
 
1854
-                if (! $filterExpr) {
1854
+                if ( ! $filterExpr) {
1855 1855
                     continue;
1856 1856
                 }
1857 1857
 
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
 
1861 1861
             if ($filterClauses) {
1862 1862
                 if ($condSql) {
1863
-                    $condSql = '(' . $condSql . ') AND ';
1863
+                    $condSql = '('.$condSql.') AND ';
1864 1864
                 }
1865 1865
 
1866 1866
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1868,11 +1868,11 @@  discard block
 block discarded – undo
1868 1868
         }
1869 1869
 
1870 1870
         if ($condSql) {
1871
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1871
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1872 1872
         }
1873 1873
 
1874 1874
         if ($discrSql) {
1875
-            return ' WHERE ' . $discrSql;
1875
+            return ' WHERE '.$discrSql;
1876 1876
         }
1877 1877
 
1878 1878
         return '';
@@ -1885,7 +1885,7 @@  discard block
 block discarded – undo
1885 1885
     {
1886 1886
         // Phase 2 AST optimization: Skip processing of ConditionalExpression
1887 1887
         // if only one ConditionalTerm is defined
1888
-        if (! ($condExpr instanceof AST\ConditionalExpression)) {
1888
+        if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
1889 1889
             return $this->walkConditionalTerm($condExpr);
1890 1890
         }
1891 1891
 
@@ -1899,7 +1899,7 @@  discard block
 block discarded – undo
1899 1899
     {
1900 1900
         // Phase 2 AST optimization: Skip processing of ConditionalTerm
1901 1901
         // if only one ConditionalFactor is defined
1902
-        if (! ($condTerm instanceof AST\ConditionalTerm)) {
1902
+        if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
1903 1903
             return $this->walkConditionalFactor($condTerm);
1904 1904
         }
1905 1905
 
@@ -1915,7 +1915,7 @@  discard block
 block discarded – undo
1915 1915
         // if only one ConditionalPrimary is defined
1916 1916
         return ( ! ($factor instanceof AST\ConditionalFactor))
1917 1917
             ? $this->walkConditionalPrimary($factor)
1918
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1918
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1919 1919
     }
1920 1920
 
1921 1921
     /**
@@ -1930,7 +1930,7 @@  discard block
 block discarded – undo
1930 1930
         if ($primary->isConditionalExpression()) {
1931 1931
             $condExpr = $primary->conditionalExpression;
1932 1932
 
1933
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1933
+            return '('.$this->walkConditionalExpression($condExpr).')';
1934 1934
         }
1935 1935
     }
1936 1936
 
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
     {
1942 1942
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1943 1943
 
1944
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1944
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1945 1945
 
1946 1946
         return $sql;
1947 1947
     }
@@ -1990,7 +1990,7 @@  discard block
 block discarded – undo
1990 1990
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1991 1991
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1992 1992
 
1993
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
1993
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
1994 1994
 
1995 1995
             $sqlParts = [];
1996 1996
 
@@ -2011,7 +2011,7 @@  discard block
 block discarded – undo
2011 2011
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2012 2012
                 }
2013 2013
 
2014
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2014
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2015 2015
             }
2016 2016
 
2017 2017
             $sql .= implode(' AND ', $sqlParts);
@@ -2025,7 +2025,7 @@  discard block
 block discarded – undo
2025 2025
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2026 2026
 
2027 2027
             // join to target table
2028
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON ';
2028
+            $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON ';
2029 2029
 
2030 2030
             // join conditions
2031 2031
             $joinSqlParts = [];
@@ -2076,13 +2076,13 @@  discard block
 block discarded – undo
2076 2076
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2077 2077
                 }
2078 2078
 
2079
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2079
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2080 2080
             }
2081 2081
 
2082 2082
             $sql .= implode(' AND ', $sqlParts);
2083 2083
         }
2084 2084
 
2085
-        return $sql . ')';
2085
+        return $sql.')';
2086 2086
     }
2087 2087
 
2088 2088
     /**
@@ -2093,7 +2093,7 @@  discard block
 block discarded – undo
2093 2093
         $sizeFunc                           = new AST\Functions\SizeFunction('size');
2094 2094
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2095 2095
 
2096
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2096
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2097 2097
     }
2098 2098
 
2099 2099
     /**
@@ -2102,19 +2102,19 @@  discard block
 block discarded – undo
2102 2102
     public function walkNullComparisonExpression($nullCompExpr)
2103 2103
     {
2104 2104
         $expression = $nullCompExpr->expression;
2105
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2105
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2106 2106
 
2107 2107
         // Handle ResultVariable
2108 2108
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2109
-            return $this->walkResultVariable($expression) . $comparison;
2109
+            return $this->walkResultVariable($expression).$comparison;
2110 2110
         }
2111 2111
 
2112 2112
         // Handle InputParameter mapping inclusion to ParserResult
2113 2113
         if ($expression instanceof AST\InputParameter) {
2114
-            return $this->walkInputParameter($expression) . $comparison;
2114
+            return $this->walkInputParameter($expression).$comparison;
2115 2115
         }
2116 2116
 
2117
-        return $expression->dispatch($this) . $comparison;
2117
+        return $expression->dispatch($this).$comparison;
2118 2118
     }
2119 2119
 
2120 2120
     /**
@@ -2122,7 +2122,7 @@  discard block
 block discarded – undo
2122 2122
      */
2123 2123
     public function walkInExpression($inExpr)
2124 2124
     {
2125
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2125
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2126 2126
 
2127 2127
         $sql .= ($inExpr->subselect)
2128 2128
             ? $this->walkSubselect($inExpr->subselect)
@@ -2146,12 +2146,12 @@  discard block
 block discarded – undo
2146 2146
         $discrColumnType  = $discrColumn->getType();
2147 2147
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2148 2148
         $sqlTableAlias    = $this->useSqlTableAliases
2149
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2149
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2150 2150
             : '';
2151 2151
 
2152 2152
         return sprintf(
2153 2153
             '%s %sIN %s',
2154
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2154
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2155 2155
             ($instanceOfExpr->not ? 'NOT ' : ''),
2156 2156
             $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr)
2157 2157
         );
@@ -2198,8 +2198,8 @@  discard block
 block discarded – undo
2198 2198
             $sql .= ' NOT';
2199 2199
         }
2200 2200
 
2201
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2202
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2201
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2202
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2203 2203
 
2204 2204
         return $sql;
2205 2205
     }
@@ -2214,7 +2214,7 @@  discard block
 block discarded – undo
2214 2214
             ? $this->walkResultVariable($stringExpr)
2215 2215
             : $stringExpr->dispatch($this);
2216 2216
 
2217
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2217
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2218 2218
 
2219 2219
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2220 2220
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2227,7 +2227,7 @@  discard block
 block discarded – undo
2227 2227
         }
2228 2228
 
2229 2229
         if ($likeExpr->escapeChar) {
2230
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2230
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2231 2231
         }
2232 2232
 
2233 2233
         return $sql;
@@ -2254,7 +2254,7 @@  discard block
 block discarded – undo
2254 2254
             ? $leftExpr->dispatch($this)
2255 2255
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2256 2256
 
2257
-        $sql .= ' ' . $compExpr->operator . ' ';
2257
+        $sql .= ' '.$compExpr->operator.' ';
2258 2258
 
2259 2259
         $sql .= ($rightExpr instanceof AST\Node)
2260 2260
             ? $rightExpr->dispatch($this)
@@ -2290,7 +2290,7 @@  discard block
 block discarded – undo
2290 2290
     {
2291 2291
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2292 2292
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2293
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2293
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2294 2294
     }
2295 2295
 
2296 2296
     /**
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
      */
2299 2299
     public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
2300 2300
     {
2301
-        if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2301
+        if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2302 2302
             return $this->walkArithmeticTerm($simpleArithmeticExpr);
2303 2303
         }
2304 2304
 
@@ -2318,7 +2318,7 @@  discard block
 block discarded – undo
2318 2318
 
2319 2319
         // Phase 2 AST optimization: Skip processing of ArithmeticTerm
2320 2320
         // if only one ArithmeticFactor is defined
2321
-        if (! ($term instanceof AST\ArithmeticTerm)) {
2321
+        if ( ! ($term instanceof AST\ArithmeticTerm)) {
2322 2322
             return $this->walkArithmeticFactor($term);
2323 2323
         }
2324 2324
 
@@ -2338,13 +2338,13 @@  discard block
 block discarded – undo
2338 2338
 
2339 2339
         // Phase 2 AST optimization: Skip processing of ArithmeticFactor
2340 2340
         // if only one ArithmeticPrimary is defined
2341
-        if (! ($factor instanceof AST\ArithmeticFactor)) {
2341
+        if ( ! ($factor instanceof AST\ArithmeticFactor)) {
2342 2342
             return $this->walkArithmeticPrimary($factor);
2343 2343
         }
2344 2344
 
2345 2345
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2346 2346
 
2347
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2347
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2348 2348
     }
2349 2349
 
2350 2350
     /**
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
     public function walkArithmeticPrimary($primary)
2358 2358
     {
2359 2359
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2360
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2360
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2361 2361
         }
2362 2362
 
2363 2363
         if ($primary instanceof AST\Node) {
@@ -2415,7 +2415,7 @@  discard block
 block discarded – undo
2415 2415
             $entityClassName = $entityClass->getClassName();
2416 2416
 
2417 2417
             if ($entityClassName !== $rootClass->getClassName()) {
2418
-                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2418
+                if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2419 2419
                     throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
2420 2420
                 }
2421 2421
             }
@@ -2427,6 +2427,6 @@  discard block
 block discarded – undo
2427 2427
             $sqlParameterList[] = $this->conn->quote($discriminator);
2428 2428
         }
2429 2429
 
2430
-        return '(' . implode(', ', $sqlParameterList) . ')';
2430
+        return '('.implode(', ', $sqlParameterList).')';
2431 2431
     }
2432 2432
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Printer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function startProduction($name)
47 47
     {
48
-        $this->println('(' . $name);
48
+        $this->println('('.$name);
49 49
         $this->indent++;
50 50
     }
51 51
 
Please login to merge, or discard this patch.