Completed
Pull Request — develop (#6913)
by Filippo
116:44 queued 51:56
created
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests;
6 6
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
             $conn->executeUpdate('DELETE FROM RoutingLocation');
404 404
         }
405 405
 
406
-        if(isset($this->usedModelSets['navigation'])) {
406
+        if (isset($this->usedModelSets['navigation'])) {
407 407
             $conn->executeUpdate('DELETE FROM navigation_tour_pois');
408 408
             $conn->executeUpdate('DELETE FROM navigation_photos');
409 409
             $conn->executeUpdate('DELETE FROM navigation_pois');
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         }
413 413
 
414 414
         if (isset($this->usedModelSets['directorytree'])) {
415
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("file"));
415
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("file"));
416 416
             // MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
417 417
             $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
418 418
             $conn->executeUpdate('DELETE FROM Directory');
@@ -505,12 +505,12 @@  discard block
 block discarded – undo
505 505
                 )
506 506
             );
507 507
 
508
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups'));
509
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-group"));
510
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-phone"));
511
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-user"));
512
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-address"));
513
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city'));
508
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups'));
509
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-group"));
510
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-phone"));
511
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-user"));
512
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-address"));
513
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city'));
514 514
         }
515 515
 
516 516
         if (isset($this->usedModelSets['vct_onetoone'])) {
@@ -645,15 +645,15 @@  discard block
 block discarded – undo
645 645
     {
646 646
         $this->setUpDBALTypes();
647 647
 
648
-        if (! isset(static::$sharedConn)) {
648
+        if ( ! isset(static::$sharedConn)) {
649 649
             static::$sharedConn = TestUtil::getConnection();
650 650
         }
651 651
 
652 652
         if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) {
653 653
             if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ["mysql", "postgresql"])) {
654
-                static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/');
654
+                static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/');
655 655
             } elseif (static::$sharedConn->getDatabasePlatform()->getName() === "oracle") {
656
-                static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual');
656
+                static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual');
657 657
             }
658 658
         }
659 659
 
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
         }
664 664
 
665 665
         foreach ($this->usedModelSets as $setName => $bool) {
666
-            if (! isset(static::$tablesCreated[$setName])) {
666
+            if ( ! isset(static::$tablesCreated[$setName])) {
667 667
                 $this->setUpEntitySchema(static::$modelSets[$setName]);
668 668
 
669 669
                 static::$tablesCreated[$setName] = true;
@@ -738,8 +738,8 @@  discard block
 block discarded – undo
738 738
 
739 739
         $config->setMetadataDriverImpl(
740 740
             $mappingDriver ?? $config->newDefaultAnnotationDriver([
741
-                realpath(__DIR__ . '/Models/Cache'),
742
-                realpath(__DIR__ . '/Models/GeoNames')
741
+                realpath(__DIR__.'/Models/Cache'),
742
+                realpath(__DIR__.'/Models/GeoNames')
743 743
             ])
744 744
         );
745 745
 
@@ -803,9 +803,9 @@  discard block
 block discarded – undo
803 803
             $trace = $e->getTrace();
804 804
             $traceMsg = "";
805 805
 
806
-            foreach($trace AS $part) {
807
-                if(isset($part['file'])) {
808
-                    if(strpos($part['file'], "PHPUnit/") !== false) {
806
+            foreach ($trace AS $part) {
807
+                if (isset($part['file'])) {
808
+                    if (strpos($part['file'], "PHPUnit/") !== false) {
809 809
                         // Beginning with PHPUnit files we don't print the trace anymore.
810 810
                         break;
811 811
                     }
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 
817 817
             $message = "[".get_class($e)."] ".$e->getMessage().PHP_EOL.PHP_EOL."With queries:".PHP_EOL.$queries.PHP_EOL."Trace:".PHP_EOL.$traceMsg;
818 818
 
819
-            throw new \Exception($message, (int)$e->getCode(), $e);
819
+            throw new \Exception($message, (int) $e->getCode(), $e);
820 820
         }
821 821
 
822 822
         throw $e;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
                 // It's a joined result
98 98
 
99 99
                 $parent = $this->rsm->parentAliasMap[$dqlAlias];
100
-                $path   = $parent . '.' . $dqlAlias;
100
+                $path   = $parent.'.'.$dqlAlias;
101 101
 
102 102
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
103
-                if ( ! isset($nonemptyComponents[$parent]) ) {
103
+                if ( ! isset($nonemptyComponents[$parent])) {
104 104
                     continue;
105 105
                 }
106 106
 
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
                 if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) {
110 110
                     $first = reset($this->resultPointers);
111 111
                     // TODO: Exception if $key === null ?
112
-                    $baseElement =& $this->resultPointers[$parent][key($first)];
112
+                    $baseElement = & $this->resultPointers[$parent][key($first)];
113 113
                 } elseif (isset($this->resultPointers[$parent])) {
114
-                    $baseElement =& $this->resultPointers[$parent];
114
+                    $baseElement = & $this->resultPointers[$parent];
115 115
                 } else {
116 116
                     unset($this->resultPointers[$dqlAlias]); // Ticket #1228
117 117
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 $relation      = $parentClass->getProperty($relationAlias);
124 124
 
125 125
                 // Check the type of the relation (many or single-valued)
126
-                if (! $relation instanceof ToOneAssociationMetadata) {
126
+                if ( ! $relation instanceof ToOneAssociationMetadata) {
127 127
                     $oneToOne = false;
128 128
 
129 129
                     if ( ! isset($baseElement[$relationAlias])) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     }
163 163
                 }
164 164
 
165
-                $coll =& $baseElement[$relationAlias];
165
+                $coll = & $baseElement[$relationAlias];
166 166
 
167 167
                 if (is_array($coll)) {
168 168
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                 $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0;
175 175
 
176 176
                 // if this row has a NULL value for the root result id then make it a null result.
177
-                if ( ! isset($nonemptyComponents[$dqlAlias]) ) {
177
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
178 178
                     $result[] = $this->rsm->isMixed
179 179
                         ? [$entityKey => null]
180 180
                         : null;
@@ -274,13 +274,13 @@  discard block
 block discarded – undo
274 274
         }
275 275
 
276 276
         if ($oneToOne) {
277
-            $this->resultPointers[$dqlAlias] =& $coll;
277
+            $this->resultPointers[$dqlAlias] = & $coll;
278 278
 
279 279
             return;
280 280
         }
281 281
 
282 282
         if ($index !== false) {
283
-            $this->resultPointers[$dqlAlias] =& $coll[$index];
283
+            $this->resultPointers[$dqlAlias] = & $coll[$index];
284 284
 
285 285
             return;
286 286
         }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         }
291 291
 
292 292
         end($coll);
293
-        $this->resultPointers[$dqlAlias] =& $coll[key($coll)];
293
+        $this->resultPointers[$dqlAlias] = & $coll[key($coll)];
294 294
 
295 295
         return;
296 296
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     protected function prepare()
69 69
     {
70
-        if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) {
70
+        if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) {
71 71
             $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true;
72 72
         }
73 73
 
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 
78 78
             // Remember which associations are "fetch joined", so that we know where to inject
79 79
             // collection stubs or proxies and where not.
80
-            if (! isset($this->rsm->relationMap[$dqlAlias])) {
80
+            if ( ! isset($this->rsm->relationMap[$dqlAlias])) {
81 81
                 continue;
82 82
             }
83 83
 
84 84
             $parent = $this->rsm->parentAliasMap[$dqlAlias];
85 85
 
86
-            if (! isset($this->rsm->aliasMap[$parent])) {
86
+            if ( ! isset($this->rsm->aliasMap[$parent])) {
87 87
                 throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent);
88 88
             }
89 89
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 $class        = $this->getClassMetadata($className);
110 110
                 $inverseAssoc = $class->getProperty($association->getInversedBy());
111 111
 
112
-                if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) {
112
+                if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) {
113 113
                     continue;
114 114
                 }
115 115
 
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
         $value       = $association->getValue($entity);
176 176
         $oid         = spl_object_hash($entity);
177 177
 
178
-        if (! $value instanceof PersistentCollection) {
178
+        if ( ! $value instanceof PersistentCollection) {
179 179
             $value = $association->wrap($entity, $value, $this->em);
180 180
 
181 181
             $association->setValue($entity, $value);
182 182
 
183 183
             $this->uow->setOriginalEntityProperty($oid, $fieldName, $value);
184 184
 
185
-            $this->initializedCollections[$oid . $fieldName] = $value;
185
+            $this->initializedCollections[$oid.$fieldName] = $value;
186 186
         } elseif (
187 187
             isset($this->hints[Query::HINT_REFRESH]) ||
188 188
             (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized())
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
             $value->setInitialized(true);
193 193
             $value->unwrap()->clear();
194 194
 
195
-            $this->initializedCollections[$oid . $fieldName] = $value;
195
+            $this->initializedCollections[$oid.$fieldName] = $value;
196 196
         } else {
197 197
             // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN!
198
-            $this->existingCollections[$oid . $fieldName] = $value;
198
+            $this->existingCollections[$oid.$fieldName] = $value;
199 199
         }
200 200
 
201 201
         return $value;
@@ -313,10 +313,10 @@  discard block
 block discarded – undo
313 313
                 $parentAlias = $this->rsm->parentAliasMap[$dqlAlias];
314 314
                 // we need the $path to save into the identifier map which entities were already
315 315
                 // seen for this parent-child relationship
316
-                $path = $parentAlias . '.' . $dqlAlias;
316
+                $path = $parentAlias.'.'.$dqlAlias;
317 317
 
318 318
                 // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs
319
-                if (! isset($nonemptyComponents[$parentAlias])) {
319
+                if ( ! isset($nonemptyComponents[$parentAlias])) {
320 320
                     // TODO: Add special case code where we hydrate the right join objects into identity map at least
321 321
                     continue;
322 322
                 }
@@ -347,15 +347,15 @@  discard block
 block discarded – undo
347 347
                 $oid = spl_object_hash($parentObject);
348 348
 
349 349
                 // Check the type of the relation (many or single-valued)
350
-                if (! ($association instanceof ToOneAssociationMetadata)) {
350
+                if ( ! ($association instanceof ToOneAssociationMetadata)) {
351 351
                     // PATH A: Collection-valued association
352 352
                     $reflFieldValue = $association->getValue($parentObject);
353 353
 
354 354
                     if (isset($nonemptyComponents[$dqlAlias])) {
355
-                        $collKey = $oid . $relationField;
355
+                        $collKey = $oid.$relationField;
356 356
                         if (isset($this->initializedCollections[$collKey])) {
357 357
                             $reflFieldValue = $this->initializedCollections[$collKey];
358
-                        } elseif (! isset($this->existingCollections[$collKey])) {
358
+                        } elseif ( ! isset($this->existingCollections[$collKey])) {
359 359
                             $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias);
360 360
                         }
361 361
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                         $index          = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false;
364 364
                         $indexIsValid   = $index !== false ? isset($reflFieldValue[$index]) : false;
365 365
 
366
-                        if (! $indexExists || ! $indexIsValid) {
366
+                        if ( ! $indexExists || ! $indexIsValid) {
367 367
                             if (isset($this->existingCollections[$collKey])) {
368 368
                                 // Collection exists, only look for the element in the identity map.
369 369
                                 if ($element = $this->getEntityFromIdentityMap($entityName, $data)) {
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                     // PATH B: Single-valued association
400 400
                     $reflFieldValue = $association->getValue($parentObject);
401 401
 
402
-                    if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) ||
402
+                    if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) ||
403 403
                         ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) {
404 404
                         // we only need to take action if this value is null,
405 405
                         // we refresh the entity or its an uninitialized proxy.
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                 $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0;
461 461
 
462 462
                 // if this row has a NULL value for the root result id then make it a null result.
463
-                if ( ! isset($nonemptyComponents[$dqlAlias]) ) {
463
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
464 464
                     if ($this->rsm->isMixed) {
465 465
                         $result[] = [$entityKey => null];
466 466
                     } else {
@@ -516,13 +516,13 @@  discard block
 block discarded – undo
516 516
             }
517 517
         }
518 518
 
519
-        if ( ! isset($resultKey) ) {
519
+        if ( ! isset($resultKey)) {
520 520
             $this->resultCounter++;
521 521
         }
522 522
 
523 523
         // Append scalar values to mixed result sets
524 524
         if (isset($rowData['scalars'])) {
525
-            if ( ! isset($resultKey) ) {
525
+            if ( ! isset($resultKey)) {
526 526
                 $resultKey = (isset($this->rsm->indexByMap['scalars']))
527 527
                     ? $row[$this->rsm->indexByMap['scalars']]
528 528
                     : $this->resultCounter - 1;
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 
536 536
         // Append new object to mixed result sets
537 537
         if (isset($rowData['newObjects'])) {
538
-            if ( ! isset($resultKey) ) {
538
+            if ( ! isset($resultKey)) {
539 539
                 $resultKey = $this->resultCounter - 1;
540 540
             }
541 541
 
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
                 $args   = $newObject['args'];
548 548
                 $obj    = $class->newInstanceArgs($args);
549 549
 
550
-                if ($hasNoScalars && \count($rowData['newObjects']) === 1 ) {
550
+                if ($hasNoScalars && \count($rowData['newObjects']) === 1) {
551 551
                     $result[$resultKey] = $obj;
552 552
 
553 553
                     continue;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
@@ -300,14 +300,14 @@  discard block
 block discarded – undo
300 300
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
301 301
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
302 302
         $identifier     = array_map(
303
-            function ($columnName) { return $this->platform->quoteIdentifier($columnName); },
303
+            function($columnName) { return $this->platform->quoteIdentifier($columnName); },
304 304
             array_keys($versionedClass->getIdentifierColumns($this->em))
305 305
         );
306 306
 
307 307
         // FIXME: Order with composite keys might not be correct
308
-        $sql = 'SELECT ' . $columnName
309
-             . ' FROM '  . $tableName
310
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
308
+        $sql = 'SELECT '.$columnName
309
+             . ' FROM '.$tableName
310
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
311 311
 
312 312
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
313 313
         $versionType = $versionProperty->getType();
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 
394 394
             if (($value = $identifier[$field]) !== null) {
395 395
                 // @todo guilhermeblanco Make sure we do not have flat association values.
396
-                if (! is_array($value)) {
396
+                if ( ! is_array($value)) {
397 397
                     $value = [$targetClass->identifier[0] => $value];
398 398
                 }
399 399
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
407 407
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
408 408
 
409
-                if (! $joinColumn->getType()) {
409
+                if ( ! $joinColumn->getType()) {
410 410
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
411 411
                 }
412 412
 
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
475 475
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
476 476
 
477
-                        if (! $joinColumn->getType()) {
477
+                        if ( ! $joinColumn->getType()) {
478 478
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
479 479
                         }
480 480
 
@@ -501,18 +501,18 @@  discard block
 block discarded – undo
501 501
                 case Type::SMALLINT:
502 502
                 case Type::INTEGER:
503 503
                 case Type::BIGINT:
504
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
504
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
505 505
                     break;
506 506
 
507 507
                 case Type::DATETIME:
508
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
508
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
509 509
                     break;
510 510
             }
511 511
         }
512 512
 
513
-        $sql = 'UPDATE ' . $quotedTableName
514
-             . ' SET ' . implode(', ', $set)
515
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
513
+        $sql = 'UPDATE '.$quotedTableName
514
+             . ' SET '.implode(', ', $set)
515
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
516 516
 
517 517
         $result = $this->conn->executeUpdate($sql, $params, $types);
518 518
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
     protected function deleteJoinTableRecords($identifier)
532 532
     {
533 533
         foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
534
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
534
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
535 535
                 continue;
536 536
             }
537 537
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
             $keys              = [];
545 545
 
546 546
             if ( ! $owningAssociation->isOwningSide()) {
547
-                $class       = $this->em->getClassMetadata($association->getTargetEntity());
547
+                $class = $this->em->getClassMetadata($association->getTargetEntity());
548 548
                 $owningAssociation = $class->getProperty($association->getMappedBy());
549 549
             }
550 550
 
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             }
657 657
 
658 658
             // Only owning side of x-1 associations can have a FK column.
659
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
659
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
660 660
                 continue;
661 661
             }
662 662
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                 /** @var JoinColumnMetadata $joinColumn */
677 677
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
678 678
 
679
-                if (! $joinColumn->getType()) {
679
+                if ( ! $joinColumn->getType()) {
680 680
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
681 681
                 }
682 682
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $propertyName = $this->class->fieldNames[$columnName];
706 706
         $property     = $this->class->getProperty($propertyName);
707 707
 
708
-        if (! $property) {
708
+        if ( ! $property) {
709 709
             return null;
710 710
         }
711 711
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
             /** @var JoinColumnMetadata $joinColumn */
725 725
             $referencedColumnName = $joinColumn->getReferencedColumnName();
726 726
 
727
-            if (! $joinColumn->getType()) {
727
+            if ( ! $joinColumn->getType()) {
728 728
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
729 729
             }
730 730
 
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
         $criteria       = [];
1062 1062
         $parameters     = [];
1063 1063
 
1064
-        if (! $association->isOwningSide()) {
1064
+        if ( ! $association->isOwningSide()) {
1065 1065
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1066 1066
             $owningAssoc = $class->getProperty($association->getMappedBy());
1067 1067
         }
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
                 $value = $value[$targetClass->identifier[0]];
1090 1090
             }
1091 1091
 
1092
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1092
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1093 1093
             $parameters[] = [
1094 1094
                 'value' => $value,
1095 1095
                 'field' => $fieldName,
@@ -1140,11 +1140,11 @@  discard block
 block discarded – undo
1140 1140
 
1141 1141
         switch ($lockMode) {
1142 1142
             case LockMode::PESSIMISTIC_READ:
1143
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1143
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1144 1144
                 break;
1145 1145
 
1146 1146
             case LockMode::PESSIMISTIC_WRITE:
1147
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1147
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1148 1148
                 break;
1149 1149
         }
1150 1150
 
@@ -1155,14 +1155,14 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
         if ('' !== $filterSql) {
1157 1157
             $conditionSql = $conditionSql
1158
-                ? $conditionSql . ' AND ' . $filterSql
1158
+                ? $conditionSql.' AND '.$filterSql
1159 1159
                 : $filterSql;
1160 1160
         }
1161 1161
 
1162
-        $select = 'SELECT ' . $columnList;
1163
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1164
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1165
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1162
+        $select = 'SELECT '.$columnList;
1163
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1164
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1165
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1166 1166
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1167 1167
         $query  = $select
1168 1168
             . $lock
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
             . $where
1171 1171
             . $orderBySql;
1172 1172
 
1173
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1173
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1174 1174
     }
1175 1175
 
1176 1176
     /**
@@ -1189,13 +1189,13 @@  discard block
 block discarded – undo
1189 1189
 
1190 1190
         if ('' !== $filterSql) {
1191 1191
             $conditionSql = $conditionSql
1192
-                ? $conditionSql . ' AND ' . $filterSql
1192
+                ? $conditionSql.' AND '.$filterSql
1193 1193
                 : $filterSql;
1194 1194
         }
1195 1195
 
1196 1196
         $sql = 'SELECT COUNT(*) '
1197
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1198
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1197
+            . 'FROM '.$tableName.' '.$tableAlias
1198
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1199 1199
 
1200 1200
         return $sql;
1201 1201
     }
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
      */
1213 1213
     protected final function getOrderBySQL(array $orderBy, $baseTableAlias)
1214 1214
     {
1215
-        if (! $orderBy) {
1215
+        if ( ! $orderBy) {
1216 1216
             return '';
1217 1217
         }
1218 1218
 
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         foreach ($orderBy as $fieldName => $orientation) {
1222 1222
             $orientation = strtoupper(trim($orientation));
1223 1223
 
1224
-            if (! in_array($orientation, ['ASC', 'DESC'])) {
1224
+            if ( ! in_array($orientation, ['ASC', 'DESC'])) {
1225 1225
                 throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName);
1226 1226
             }
1227 1227
 
@@ -1231,11 +1231,11 @@  discard block
 block discarded – undo
1231 1231
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1232 1232
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1233 1233
 
1234
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1234
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1235 1235
 
1236 1236
                 continue;
1237 1237
             } elseif ($property instanceof AssociationMetadata) {
1238
-                if (! $property->isOwningSide()) {
1238
+                if ( ! $property->isOwningSide()) {
1239 1239
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName);
1240 1240
                 }
1241 1241
 
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
                     /* @var JoinColumnMetadata $joinColumn */
1249 1249
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1250 1250
 
1251
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1251
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1252 1252
                 }
1253 1253
 
1254 1254
                 continue;
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
             throw ORMException::unrecognizedField($fieldName);
1258 1258
         }
1259 1259
 
1260
-        return ' ORDER BY ' . implode(', ', $orderByList);
1260
+        return ' ORDER BY '.implode(', ', $orderByList);
1261 1261
     }
1262 1262
 
1263 1263
     /**
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 
1280 1280
 
1281 1281
         $this->currentPersisterContext->rsm->addEntityResult($this->class->getClassName(), 'r'); // r for root
1282
-        $this->currentPersisterContext->selectJoinSql    = '';
1282
+        $this->currentPersisterContext->selectJoinSql = '';
1283 1283
 
1284 1284
         $eagerAliasCounter = 0;
1285 1285
         $columnList        = [];
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
                         break; // now this is why you shouldn't use inheritance
1316 1316
                     }
1317 1317
 
1318
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1318
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1319 1319
 
1320 1320
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1321 1321
 
@@ -1340,14 +1340,14 @@  discard block
 block discarded – undo
1340 1340
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1341 1341
                     }
1342 1342
 
1343
-                    if (! $property->isOwningSide()) {
1343
+                    if ( ! $property->isOwningSide()) {
1344 1344
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1345 1345
                     }
1346 1346
 
1347 1347
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1348 1348
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1349 1349
 
1350
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1350
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1351 1351
 
1352 1352
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1353 1353
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
                         $joinCondition[] = $filterSql;
1370 1370
                     }
1371 1371
 
1372
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1372
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1373 1373
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1374 1374
 
1375 1375
                     break;
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
      */
1394 1394
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1395 1395
     {
1396
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1396
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1397 1397
             return '';
1398 1398
         }
1399 1399
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
             $referencedColumnName = $joinColumn->getReferencedColumnName();
1409 1409
             $resultColumnName     = $this->getSQLColumnAlias();
1410 1410
 
1411
-            if (! $joinColumn->getType()) {
1411
+            if ( ! $joinColumn->getType()) {
1412 1412
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1413 1413
             }
1414 1414
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
         $owningAssociation = $association;
1441 1441
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1442 1442
 
1443
-        if (! $association->isOwningSide()) {
1443
+        if ( ! $association->isOwningSide()) {
1444 1444
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1445 1445
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1446 1446
         }
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
             );
1463 1463
         }
1464 1464
 
1465
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1465
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1466 1466
     }
1467 1467
 
1468 1468
     /**
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
                             $columnName           = $joinColumn->getColumnName();
1558 1558
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1559 1559
 
1560
-                            if (! $joinColumn->getType()) {
1560
+                            if ( ! $joinColumn->getType()) {
1561 1561
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1562 1562
                             }
1563 1563
 
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
 
1597 1597
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1598 1598
 
1599
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1599
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1600 1600
     }
1601 1601
 
1602 1602
     /**
@@ -1610,14 +1610,14 @@  discard block
 block discarded – undo
1610 1610
     protected function getSQLTableAlias($tableName, $assocName = '')
1611 1611
     {
1612 1612
         if ($tableName) {
1613
-            $tableName .= '#' . $assocName;
1613
+            $tableName .= '#'.$assocName;
1614 1614
         }
1615 1615
 
1616 1616
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1617 1617
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1618 1618
         }
1619 1619
 
1620
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1620
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1621 1621
 
1622 1622
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1623 1623
 
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
         }
1645 1645
 
1646 1646
         $lock  = $this->getLockTablesSql($lockMode);
1647
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1647
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1648 1648
         $sql = 'SELECT 1 '
1649 1649
              . $lock
1650 1650
              . $where
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1668 1668
 
1669 1669
         return $this->platform->appendLockHint(
1670
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1670
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1671 1671
             $lockMode
1672 1672
         );
1673 1673
     }
@@ -1720,19 +1720,19 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
             if (null !== $comparison) {
1722 1722
                 // special case null value handling
1723
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1724
-                    $selectedColumns[] = $column . ' IS NULL';
1723
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1724
+                    $selectedColumns[] = $column.' IS NULL';
1725 1725
 
1726 1726
                     continue;
1727 1727
                 }
1728 1728
 
1729 1729
                 if ($comparison === Comparison::NEQ && null === $value) {
1730
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1730
+                    $selectedColumns[] = $column.' IS NOT NULL';
1731 1731
 
1732 1732
                     continue;
1733 1733
                 }
1734 1734
 
1735
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1735
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1736 1736
 
1737 1737
                 continue;
1738 1738
             }
@@ -1781,7 +1781,7 @@  discard block
 block discarded – undo
1781 1781
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1782 1782
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1783 1783
 
1784
-            return [$tableAlias . '.' . $columnName];
1784
+            return [$tableAlias.'.'.$columnName];
1785 1785
         }
1786 1786
 
1787 1787
         if ($property instanceof AssociationMetadata) {
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
 
1791 1791
             // Many-To-Many requires join table check for joinColumn
1792 1792
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1793
-                if (! $owningAssociation->isOwningSide()) {
1793
+                if ( ! $owningAssociation->isOwningSide()) {
1794 1794
                     $owningAssociation = $association;
1795 1795
                 }
1796 1796
 
@@ -1804,15 +1804,15 @@  discard block
 block discarded – undo
1804 1804
                 foreach ($joinColumns as $joinColumn) {
1805 1805
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1806 1806
 
1807
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1807
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1808 1808
                 }
1809 1809
 
1810 1810
             } else {
1811
-                if (! $owningAssociation->isOwningSide()) {
1811
+                if ( ! $owningAssociation->isOwningSide()) {
1812 1812
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field);
1813 1813
                 }
1814 1814
 
1815
-                $class      = $this->class->isInheritedProperty($field)
1815
+                $class = $this->class->isInheritedProperty($field)
1816 1816
                     ? $owningAssociation->getDeclaringClass()
1817 1817
                     : $this->class
1818 1818
                 ;
@@ -1821,7 +1821,7 @@  discard block
 block discarded – undo
1821 1821
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1822 1822
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1823 1823
 
1824
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1824
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1825 1825
                 }
1826 1826
             }
1827 1827
 
@@ -1934,7 +1934,7 @@  discard block
 block discarded – undo
1934 1934
                 $value = $value[$targetClass->identifier[0]];
1935 1935
             }
1936 1936
 
1937
-            $criteria[$tableAlias . "." . $quotedColumnName] = $value;
1937
+            $criteria[$tableAlias.".".$quotedColumnName] = $value;
1938 1938
             $parameters[] = [
1939 1939
                 'value' => $value,
1940 1940
                 'field' => $fieldName,
@@ -2021,7 +2021,7 @@  discard block
 block discarded – undo
2021 2021
             case ($property instanceof AssociationMetadata):
2022 2022
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2023 2023
 
2024
-                if (! $property->isOwningSide()) {
2024
+                if ( ! $property->isOwningSide()) {
2025 2025
                     $property = $class->getProperty($property->getMappedBy());
2026 2026
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2027 2027
                 }
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
                     /** @var JoinColumnMetadata $joinColumn */
2036 2036
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2037 2037
 
2038
-                    if (! $joinColumn->getType()) {
2038
+                    if ( ! $joinColumn->getType()) {
2039 2039
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2040 2040
                     }
2041 2041
 
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
         }
2051 2051
 
2052 2052
         if (is_array($value)) {
2053
-            return array_map(function ($type) {
2053
+            return array_map(function($type) {
2054 2054
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2055 2055
             }, $types);
2056 2056
         }
@@ -2129,12 +2129,12 @@  discard block
 block discarded – undo
2129 2129
 
2130 2130
         $sql = 'SELECT 1 '
2131 2131
              . $this->getLockTablesSql(null)
2132
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2132
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2133 2133
 
2134 2134
         list($params, $types) = $this->expandParameters($criteria);
2135 2135
 
2136 2136
         if (null !== $extraConditions) {
2137
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2137
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2138 2138
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2139 2139
 
2140 2140
             $params = array_merge($params, $criteriaParams);
@@ -2142,7 +2142,7 @@  discard block
 block discarded – undo
2142 2142
         }
2143 2143
 
2144 2144
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2145
-            $sql .= ' AND ' . $filterSql;
2145
+            $sql .= ' AND '.$filterSql;
2146 2146
         }
2147 2147
 
2148 2148
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2157,13 +2157,13 @@  discard block
 block discarded – undo
2157 2157
      */
2158 2158
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2159 2159
     {
2160
-        if (! $association->isOwningSide()) {
2160
+        if ( ! $association->isOwningSide()) {
2161 2161
             return 'LEFT JOIN';
2162 2162
         }
2163 2163
 
2164 2164
         // if one of the join columns is nullable, return left join
2165 2165
         foreach ($association->getJoinColumns() as $joinColumn) {
2166
-             if (! $joinColumn->isNullable()) {
2166
+             if ( ! $joinColumn->isNullable()) {
2167 2167
                  continue;
2168 2168
              }
2169 2169
 
@@ -2180,7 +2180,7 @@  discard block
 block discarded – undo
2180 2180
      */
2181 2181
     public function getSQLColumnAlias()
2182 2182
     {
2183
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2183
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2184 2184
     }
2185 2185
 
2186 2186
     /**
@@ -2197,13 +2197,13 @@  discard block
 block discarded – undo
2197 2197
 
2198 2198
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2199 2199
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2200
-                $filterClauses[] = '(' . $filterExpr . ')';
2200
+                $filterClauses[] = '('.$filterExpr.')';
2201 2201
             }
2202 2202
         }
2203 2203
 
2204 2204
         $sql = implode(' AND ', $filterClauses);
2205 2205
 
2206
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2206
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2207 2207
     }
2208 2208
 
2209 2209
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      */
254 254
     public function countDistinct($x)
255 255
     {
256
-        return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')';
256
+        return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')';
257 257
     }
258 258
 
259 259
     /**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             }
436 436
         }
437 437
 
438
-        return new Expr\Func($x . ' IN', (array) $y);
438
+        return new Expr\Func($x.' IN', (array) $y);
439 439
     }
440 440
 
441 441
     /**
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
             }
457 457
         }
458 458
 
459
-        return new Expr\Func($x . ' NOT IN', (array) $y);
459
+        return new Expr\Func($x.' NOT IN', (array) $y);
460 460
     }
461 461
 
462 462
     /**
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
      */
469 469
     public function isNull($x)
470 470
     {
471
-        return $x . ' IS NULL';
471
+        return $x.' IS NULL';
472 472
     }
473 473
 
474 474
     /**
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
      */
481 481
     public function isNotNull($x)
482 482
     {
483
-        return $x . ' IS NOT NULL';
483
+        return $x.' IS NOT NULL';
484 484
     }
485 485
 
486 486
     /**
@@ -598,12 +598,12 @@  discard block
 block discarded – undo
598 598
      */
599 599
     private function quoteLiteral($literal)
600 600
     {
601
-        if (is_numeric($literal) && !is_string($literal)) {
601
+        if (is_numeric($literal) && ! is_string($literal)) {
602 602
             return (string) $literal;
603 603
         } elseif (is_bool($literal)) {
604 604
             return $literal ? "true" : "false";
605 605
         } else {
606
-            return "'" . str_replace("'", "''", $literal) . "'";
606
+            return "'".str_replace("'", "''", $literal)."'";
607 607
         }
608 608
     }
609 609
 
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
      */
619 619
     public function between($val, $x, $y)
620 620
     {
621
-        return $val . ' BETWEEN ' . $x . ' AND ' . $y;
621
+        return $val.' BETWEEN '.$x.' AND '.$y;
622 622
     }
623 623
 
624 624
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 1 patch
Spacing   +115 added lines, -115 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function getSQLTableAlias($tableName, $dqlAlias = '')
275 275
     {
276
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
276
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
277 277
 
278
-        if (! isset($this->tableAliasMap[$tableName])) {
279
-            $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++;
278
+        if ( ! isset($this->tableAliasMap[$tableName])) {
279
+            $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++;
280 280
         }
281 281
 
282 282
         return $this->tableAliasMap[$tableName];
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      */
295 295
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
296 296
     {
297
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
297
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
298 298
 
299 299
         $this->tableAliasMap[$tableName] = $alias;
300 300
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function getSQLColumnAlias()
310 310
     {
311
-        return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++);
311
+        return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++);
312 312
 
313 313
     }
314 314
 
@@ -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
             // Add filters on the root class
@@ -365,14 +365,14 @@  discard block
 block discarded – undo
365 365
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
366 366
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
367 367
 
368
-            $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
368
+            $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
369 369
 
370 370
             $sqlParts = [];
371 371
 
372 372
             foreach ($subClass->getIdentifierColumns($this->em) as $column) {
373 373
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
374 374
 
375
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
375
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
376 376
             }
377 377
 
378 378
             $sql .= implode(' AND ', $sqlParts);
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             $qComp       = $this->queryComponents[$dqlAlias];
394 394
             $association = $qComp['relation'];
395 395
 
396
-            if (! ($association instanceof ToManyAssociationMetadata)) {
396
+            if ( ! ($association instanceof ToManyAssociationMetadata)) {
397 397
                 continue;
398 398
             }
399 399
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                 $property      = $qComp['metadata']->getProperty($fieldName);
402 402
                 $tableName     = $property->getTableName();
403 403
                 $columnName    = $this->platform->quoteIdentifier($property->getColumnName());
404
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
404
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
405 405
 
406 406
                 // OrderByClause should replace an ordered relation. see - DDC-2475
407 407
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                 }
410 410
 
411 411
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
412
-                $orderedColumns[] = $orderedColumn . ' ' . $orientation;
412
+                $orderedColumns[] = $orderedColumn.' '.$orientation;
413 413
             }
414 414
         }
415 415
 
@@ -449,19 +449,19 @@  discard block
 block discarded – undo
449 449
             $discrColumnType  = $discrColumn->getType();
450 450
             $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
451 451
             $sqlTableAlias    = ($this->useSqlTableAliases)
452
-                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
452
+                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
453 453
                 : '';
454 454
 
455 455
             $sqlParts[] = sprintf(
456 456
                 '%s IN (%s)',
457
-                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
457
+                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
458 458
                 implode(', ', $values)
459 459
             );
460 460
         }
461 461
 
462 462
         $sql = implode(' AND ', $sqlParts);
463 463
 
464
-        return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql;
464
+        return isset($sqlParts[1]) ? '('.$sql.')' : $sql;
465 465
     }
466 466
 
467 467
     /**
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      */
475 475
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
476 476
     {
477
-        if (! $this->em->hasFilters()) {
477
+        if ( ! $this->em->hasFilters()) {
478 478
             return '';
479 479
         }
480 480
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 
506 506
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
507 507
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
508
-                $filterClauses[] = '(' . $filterExpr . ')';
508
+                $filterClauses[] = '('.$filterExpr.')';
509 509
             }
510 510
         }
511 511
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
         }
538 538
 
539 539
         if ( ! $AST->orderByClause && ($orderBySql = $this->generateOrderedCollectionOrderByItems())) {
540
-            $sql .= ' ORDER BY ' . $orderBySql;
540
+            $sql .= ' ORDER BY '.$orderBySql;
541 541
         }
542 542
 
543 543
         if ($limit !== null || $offset !== null) {
@@ -549,11 +549,11 @@  discard block
 block discarded – undo
549 549
         }
550 550
 
551 551
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
552
-            return $sql . ' ' . $this->platform->getReadLockSQL();
552
+            return $sql.' '.$this->platform->getReadLockSQL();
553 553
         }
554 554
 
555 555
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
556
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
556
+            return $sql.' '.$this->platform->getWriteLockSQL();
557 557
         }
558 558
 
559 559
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
         foreach ($class->getIdentifierColumns($this->em) as $column) {
611 611
             $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
612 612
 
613
-            $sqlParts[] = $tableAlias . '.' . $quotedColumnName;
613
+            $sqlParts[] = $tableAlias.'.'.$quotedColumnName;
614 614
         }
615 615
 
616 616
         return implode(', ', $sqlParts);
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
     {
629 629
         $class = $this->queryComponents[$identificationVariable]['metadata'];
630 630
 
631
-        if (!$fieldName) {
631
+        if ( ! $fieldName) {
632 632
             return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
633 633
         }
634 634
 
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
                 $property  = $class->getProperty($fieldName);
658 658
 
659 659
                 if ($this->useSqlTableAliases) {
660
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
660
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
661 661
                 }
662 662
 
663 663
                 $sql .= $this->platform->quoteIdentifier($property->getColumnName());
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
                 $class       = $this->queryComponents[$dqlAlias]['metadata'];
672 672
                 $association = $class->getProperty($fieldName);
673 673
 
674
-                if (! $association->isOwningSide()) {
674
+                if ( ! $association->isOwningSide()) {
675 675
                     throw QueryException::associationPathInverseSideNotSupported($pathExpr);
676 676
                 }
677 677
 
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
                 $joinColumn = reset($joinColumns);
686 686
 
687 687
                 if ($this->useSqlTableAliases) {
688
-                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.';
688
+                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.';
689 689
                 }
690 690
 
691 691
                 $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName());
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
      */
704 704
     public function walkSelectClause($selectClause)
705 705
     {
706
-        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
706
+        $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
707 707
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
708 708
 
709 709
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) {
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
 
747 747
                 $sqlSelectExpressions[] = sprintf(
748 748
                     '%s AS %s',
749
-                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform),
749
+                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform),
750 750
                     $sqlColumnAlias
751 751
                 );
752 752
 
@@ -756,12 +756,12 @@  discard block
 block discarded – undo
756 756
 
757 757
             // Add foreign key columns of class and also parent classes
758 758
             foreach ($class->getDeclaredPropertiesIterator() as $association) {
759
-                if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
759
+                if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
760 760
                     || ( ! $addMetaColumns && ! $association->isPrimaryKey())) {
761 761
                     continue;
762 762
                 }
763 763
 
764
-                $targetClass  = $this->em->getClassMetadata($association->getTargetEntity());
764
+                $targetClass = $this->em->getClassMetadata($association->getTargetEntity());
765 765
 
766 766
                 foreach ($association->getJoinColumns() as $joinColumn) {
767 767
                     /** @var JoinColumnMetadata $joinColumn */
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
                     $columnAlias          = $this->getSQLColumnAlias();
772 772
                     $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
773 773
 
774
-                    if (! $joinColumn->getType()) {
774
+                    if ( ! $joinColumn->getType()) {
775 775
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
776 776
                     }
777 777
 
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
                         continue;
802 802
                     }
803 803
 
804
-                    if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
804
+                    if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
805 805
                         continue;
806 806
                     }
807 807
 
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
                         $columnAlias          = $this->getSQLColumnAlias();
816 816
                         $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
817 817
 
818
-                        if (! $joinColumn->getType()) {
818
+                        if ( ! $joinColumn->getType()) {
819 819
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
820 820
                         }
821 821
 
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
850 850
         }
851 851
 
852
-        return ' FROM ' . implode(', ', $sqlParts);
852
+        return ' FROM '.implode(', ', $sqlParts);
853 853
     }
854 854
 
855 855
     /**
@@ -929,13 +929,13 @@  discard block
 block discarded – undo
929 929
         $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
930 930
 
931 931
         $sql = $this->platform->appendLockHint(
932
-            $tableName . ' ' . $tableAlias,
932
+            $tableName.' '.$tableAlias,
933 933
             $this->query->getHint(Query::HINT_LOCK_MODE)
934 934
         );
935 935
 
936 936
         if ($class->inheritanceType === InheritanceType::JOINED) {
937 937
             if ($buildNestedJoins) {
938
-                $sql = '(' . $sql . $this->generateClassTableInheritanceJoins($class, $dqlAlias) . ')';
938
+                $sql = '('.$sql.$this->generateClassTableInheritanceJoins($class, $dqlAlias).')';
939 939
             } else {
940 940
                 $sql .= $this->generateClassTableInheritanceJoins($class, $dqlAlias);
941 941
             }
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
         ;
979 979
 
980 980
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true &&
981
-            (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
981
+            ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
982 982
             if ($association instanceof ToManyAssociationMetadata) {
983 983
                 throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation);
984 984
             }
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
             }
1033 1033
 
1034 1034
             $targetTableJoin = [
1035
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1035
+                'table' => $targetTableName.' '.$targetTableAlias,
1036 1036
                 'condition' => implode(' AND ', $conditions),
1037 1037
             ];
1038 1038
         } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) {
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
                 );
1061 1061
             }
1062 1062
 
1063
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1063
+            $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1064 1064
 
1065 1065
             // Join target table
1066 1066
             $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
             }
1100 1100
 
1101 1101
             $targetTableJoin = [
1102
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1102
+                'table' => $targetTableName.' '.$targetTableAlias,
1103 1103
                 'condition' => implode(' AND ', $conditions),
1104 1104
             ];
1105 1105
         } else {
@@ -1107,23 +1107,23 @@  discard block
 block discarded – undo
1107 1107
         }
1108 1108
 
1109 1109
         // Handle WITH clause
1110
-        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1110
+        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1111 1111
 
1112 1112
         if ($targetClass->inheritanceType === InheritanceType::JOINED) {
1113 1113
             $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1114 1114
 
1115 1115
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1116 1116
             if ($withCondition) {
1117
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1117
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1118 1118
             } else {
1119
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1119
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1120 1120
             }
1121 1121
         } else {
1122
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1122
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1123 1123
         }
1124 1124
 
1125 1125
         if ($withCondition) {
1126
-            $sql .= ' AND ' . $withCondition;
1126
+            $sql .= ' AND '.$withCondition;
1127 1127
         }
1128 1128
 
1129 1129
         // Apply the indexes
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1157 1157
         }
1158 1158
 
1159
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1159
+        return ' ORDER BY '.implode(', ', $orderByItems);
1160 1160
     }
1161 1161
 
1162 1162
     /**
@@ -1173,10 +1173,10 @@  discard block
 block discarded – undo
1173 1173
         $this->orderedColumnsMap[$sql] = $type;
1174 1174
 
1175 1175
         if ($expr instanceof AST\Subselect) {
1176
-            return '(' . $sql . ') ' . $type;
1176
+            return '('.$sql.') '.$type;
1177 1177
         }
1178 1178
 
1179
-        return $sql . ' ' . $type;
1179
+        return $sql.' '.$type;
1180 1180
     }
1181 1181
 
1182 1182
     /**
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
      */
1185 1185
     public function walkHavingClause($havingClause)
1186 1186
     {
1187
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1187
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1188 1188
     }
1189 1189
 
1190 1190
     /**
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
                 $conditions = [];
1208 1208
 
1209 1209
                 if ($join->conditionalExpression) {
1210
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1210
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1211 1211
                 }
1212 1212
 
1213 1213
                 $isUnconditionalJoin = empty($conditions);
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
                     ? ' AND '
1216 1216
                     : ' ON ';
1217 1217
 
1218
-                $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, !$isUnconditionalJoin);
1218
+                $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, ! $isUnconditionalJoin);
1219 1219
 
1220 1220
                 // Apply remaining inheritance restrictions
1221 1221
                 $discrSql = $this->generateDiscriminatorColumnConditionSQL([$dqlAlias]);
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
                 }
1233 1233
 
1234 1234
                 if ($conditions) {
1235
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1235
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1236 1236
                 }
1237 1237
 
1238 1238
                 break;
@@ -1262,7 +1262,7 @@  discard block
 block discarded – undo
1262 1262
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1263 1263
         }
1264 1264
 
1265
-        $sql .= implode(', ', $scalarExpressions) . ')';
1265
+        $sql .= implode(', ', $scalarExpressions).')';
1266 1266
 
1267 1267
         return $sql;
1268 1268
     }
@@ -1284,7 +1284,7 @@  discard block
 block discarded – undo
1284 1284
             ? $this->conn->quote($nullIfExpression->secondExpression)
1285 1285
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1286 1286
 
1287
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1287
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1288 1288
     }
1289 1289
 
1290 1290
     /**
@@ -1299,11 +1299,11 @@  discard block
 block discarded – undo
1299 1299
         $sql = 'CASE';
1300 1300
 
1301 1301
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1302
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1303
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1302
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1303
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1304 1304
         }
1305 1305
 
1306
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1306
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1307 1307
 
1308 1308
         return $sql;
1309 1309
     }
@@ -1317,14 +1317,14 @@  discard block
 block discarded – undo
1317 1317
      */
1318 1318
     public function walkSimpleCaseExpression($simpleCaseExpression)
1319 1319
     {
1320
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1320
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1321 1321
 
1322 1322
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1323
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1324
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1323
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1324
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1325 1325
         }
1326 1326
 
1327
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1327
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1328 1328
 
1329 1329
         return $sql;
1330 1330
     }
@@ -1386,7 +1386,7 @@  discard block
 block discarded – undo
1386 1386
                 $columnAlias = $this->getSQLColumnAlias();
1387 1387
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1388 1388
 
1389
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1389
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1390 1390
 
1391 1391
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1392 1392
 
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
                 $columnAlias = $this->getSQLColumnAlias();
1402 1402
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1403 1403
 
1404
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1404
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1405 1405
 
1406 1406
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1407 1407
 
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
                 break;
1413 1413
 
1414 1414
             case ($expr instanceof AST\NewObjectExpression):
1415
-                $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable);
1415
+                $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable);
1416 1416
                 break;
1417 1417
 
1418 1418
             default:
@@ -1441,7 +1441,7 @@  discard block
 block discarded – undo
1441 1441
 
1442 1442
                 // Select all fields from the queried class
1443 1443
                 foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
1444
-                    if (! ($property instanceof FieldMetadata)) {
1444
+                    if ( ! ($property instanceof FieldMetadata)) {
1445 1445
                         continue;
1446 1446
                     }
1447 1447
 
@@ -1476,11 +1476,11 @@  discard block
 block discarded – undo
1476 1476
                         $subClass = $this->em->getClassMetadata($subClassName);
1477 1477
 
1478 1478
                         foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) {
1479
-                            if (! ($property instanceof FieldMetadata)) {
1479
+                            if ( ! ($property instanceof FieldMetadata)) {
1480 1480
                                 continue;
1481 1481
                             }
1482 1482
 
1483
-                            if ($subClass->isInheritedProperty($fieldName) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) {
1483
+                            if ($subClass->isInheritedProperty($fieldName) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) {
1484 1484
                                 continue;
1485 1485
                             }
1486 1486
 
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
      */
1516 1516
     public function walkQuantifiedExpression($qExpr)
1517 1517
     {
1518
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1518
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1519 1519
     }
1520 1520
 
1521 1521
     /**
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1556 1556
         }
1557 1557
 
1558
-        return ' FROM ' . implode(', ', $sqlParts);
1558
+        return ' FROM '.implode(', ', $sqlParts);
1559 1559
     }
1560 1560
 
1561 1561
     /**
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
      */
1564 1564
     public function walkSimpleSelectClause($simpleSelectClause)
1565 1565
     {
1566
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1566
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1567 1567
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1568 1568
     }
1569 1569
 
@@ -1582,10 +1582,10 @@  discard block
 block discarded – undo
1582 1582
      * @param null|string               $newObjectResultAlias
1583 1583
      * @return string The SQL.
1584 1584
      */
1585
-    public function walkNewObject($newObjectExpression, $newObjectResultAlias=null)
1585
+    public function walkNewObject($newObjectExpression, $newObjectResultAlias = null)
1586 1586
     {
1587 1587
         $sqlSelectExpressions = [];
1588
-        $objIndex             = $newObjectResultAlias?:$this->newObjectCounter++;
1588
+        $objIndex             = $newObjectResultAlias ?: $this->newObjectCounter++;
1589 1589
 
1590 1590
         foreach ($newObjectExpression->args as $argIndex => $e) {
1591 1591
             $resultAlias = $this->scalarResultCounter++;
@@ -1598,7 +1598,7 @@  discard block
 block discarded – undo
1598 1598
                     break;
1599 1599
 
1600 1600
                 case ($e instanceof AST\Subselect):
1601
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1601
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1602 1602
                     break;
1603 1603
 
1604 1604
                 case ($e instanceof AST\PathExpression):
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
                     $class     = $qComp['metadata'];
1608 1608
                     $fieldType = $class->getProperty($e->field)->getType();
1609 1609
 
1610
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1610
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1611 1611
                     break;
1612 1612
 
1613 1613
                 case ($e instanceof AST\Literal):
@@ -1621,11 +1621,11 @@  discard block
 block discarded – undo
1621 1621
                             break;
1622 1622
                     }
1623 1623
 
1624
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1624
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1625 1625
                     break;
1626 1626
 
1627 1627
                 default:
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
 
@@ -1658,10 +1658,10 @@  discard block
 block discarded – undo
1658 1658
             case ($expr instanceof AST\Subselect):
1659 1659
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1660 1660
 
1661
-                $columnAlias = 'sclr' . $this->aliasCounter++;
1661
+                $columnAlias = 'sclr'.$this->aliasCounter++;
1662 1662
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1663 1663
 
1664
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1664
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1665 1665
                 break;
1666 1666
 
1667 1667
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1678,7 +1678,7 @@  discard block
 block discarded – undo
1678 1678
                 $columnAlias = $this->getSQLColumnAlias();
1679 1679
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1680 1680
 
1681
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1681
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1682 1682
                 break;
1683 1683
 
1684 1684
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1698,8 +1698,8 @@  discard block
 block discarded – undo
1698 1698
      */
1699 1699
     public function walkAggregateExpression($aggExpression)
1700 1700
     {
1701
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1702
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1701
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1702
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1703 1703
     }
1704 1704
 
1705 1705
     /**
@@ -1713,7 +1713,7 @@  discard block
 block discarded – undo
1713 1713
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1714 1714
         }
1715 1715
 
1716
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1716
+        return ' GROUP BY '.implode(', ', $sqlParts);
1717 1717
     }
1718 1718
 
1719 1719
     /**
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
     {
1777 1777
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1778 1778
         $tableName = $class->getTableName();
1779
-        $sql       = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform);
1779
+        $sql       = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform);
1780 1780
 
1781 1781
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1782 1782
 
@@ -1792,12 +1792,12 @@  discard block
 block discarded – undo
1792 1792
     {
1793 1793
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1794 1794
         $tableName = $class->getTableName();
1795
-        $sql       = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform);
1795
+        $sql       = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform);
1796 1796
 
1797 1797
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1798 1798
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1799 1799
 
1800
-        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1800
+        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1801 1801
 
1802 1802
         return $sql;
1803 1803
     }
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
         $useTableAliasesBefore = $this->useSqlTableAliases;
1811 1811
         $this->useSqlTableAliases = false;
1812 1812
 
1813
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1813
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1814 1814
         $newValue = $updateItem->newValue;
1815 1815
 
1816 1816
         switch (true) {
@@ -1853,7 +1853,7 @@  discard block
 block discarded – undo
1853 1853
 
1854 1854
             if ($filterClauses) {
1855 1855
                 if ($condSql) {
1856
-                    $condSql = '(' . $condSql . ') AND ';
1856
+                    $condSql = '('.$condSql.') AND ';
1857 1857
                 }
1858 1858
 
1859 1859
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1861,11 +1861,11 @@  discard block
 block discarded – undo
1861 1861
         }
1862 1862
 
1863 1863
         if ($condSql) {
1864
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1864
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1865 1865
         }
1866 1866
 
1867 1867
         if ($discrSql) {
1868
-            return ' WHERE ' . $discrSql;
1868
+            return ' WHERE '.$discrSql;
1869 1869
         }
1870 1870
 
1871 1871
         return '';
@@ -1908,7 +1908,7 @@  discard block
 block discarded – undo
1908 1908
         // if only one ConditionalPrimary is defined
1909 1909
         return ( ! ($factor instanceof AST\ConditionalFactor))
1910 1910
             ? $this->walkConditionalPrimary($factor)
1911
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1911
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1912 1912
     }
1913 1913
 
1914 1914
     /**
@@ -1923,7 +1923,7 @@  discard block
 block discarded – undo
1923 1923
         if ($primary->isConditionalExpression()) {
1924 1924
             $condExpr = $primary->conditionalExpression;
1925 1925
 
1926
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1926
+            return '('.$this->walkConditionalExpression($condExpr).')';
1927 1927
         }
1928 1928
     }
1929 1929
 
@@ -1934,7 +1934,7 @@  discard block
 block discarded – undo
1934 1934
     {
1935 1935
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1936 1936
 
1937
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1937
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1938 1938
 
1939 1939
         return $sql;
1940 1940
     }
@@ -1983,7 +1983,7 @@  discard block
 block discarded – undo
1983 1983
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1984 1984
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1985 1985
 
1986
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
1986
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
1987 1987
 
1988 1988
             $sqlParts = [];
1989 1989
 
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2005 2005
                 }
2006 2006
 
2007
-                $sqlParts[] = $targetTableAlias . '.'  . $quotedTargetColumnName . ' = ' . $entitySql;
2007
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2008 2008
             }
2009 2009
 
2010 2010
             $sql .= implode(' AND ', $sqlParts);
@@ -2018,7 +2018,7 @@  discard block
 block discarded – undo
2018 2018
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2019 2019
 
2020 2020
             // join to target table
2021
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON ';
2021
+            $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON ';
2022 2022
 
2023 2023
             // join conditions
2024 2024
             $joinSqlParts = [];
@@ -2069,13 +2069,13 @@  discard block
 block discarded – undo
2069 2069
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2070 2070
                 }
2071 2071
 
2072
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2072
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2073 2073
             }
2074 2074
 
2075 2075
             $sql .= implode(' AND ', $sqlParts);
2076 2076
         }
2077 2077
 
2078
-        return $sql . ')';
2078
+        return $sql.')';
2079 2079
     }
2080 2080
 
2081 2081
     /**
@@ -2086,7 +2086,7 @@  discard block
 block discarded – undo
2086 2086
         $sizeFunc = new AST\Functions\SizeFunction('size');
2087 2087
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2088 2088
 
2089
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2089
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2090 2090
     }
2091 2091
 
2092 2092
     /**
@@ -2095,19 +2095,19 @@  discard block
 block discarded – undo
2095 2095
     public function walkNullComparisonExpression($nullCompExpr)
2096 2096
     {
2097 2097
         $expression = $nullCompExpr->expression;
2098
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2098
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2099 2099
 
2100 2100
         // Handle ResultVariable
2101 2101
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2102
-            return $this->walkResultVariable($expression) . $comparison;
2102
+            return $this->walkResultVariable($expression).$comparison;
2103 2103
         }
2104 2104
 
2105 2105
         // Handle InputParameter mapping inclusion to ParserResult
2106 2106
         if ($expression instanceof AST\InputParameter) {
2107
-            return $this->walkInputParameter($expression) . $comparison;
2107
+            return $this->walkInputParameter($expression).$comparison;
2108 2108
         }
2109 2109
 
2110
-        return $expression->dispatch($this) . $comparison;
2110
+        return $expression->dispatch($this).$comparison;
2111 2111
     }
2112 2112
 
2113 2113
     /**
@@ -2115,7 +2115,7 @@  discard block
 block discarded – undo
2115 2115
      */
2116 2116
     public function walkInExpression($inExpr)
2117 2117
     {
2118
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2118
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2119 2119
 
2120 2120
         $sql .= ($inExpr->subselect)
2121 2121
             ? $this->walkSubselect($inExpr->subselect)
@@ -2139,12 +2139,12 @@  discard block
 block discarded – undo
2139 2139
         $discrColumnType  = $discrColumn->getType();
2140 2140
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2141 2141
         $sqlTableAlias    = $this->useSqlTableAliases
2142
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2142
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2143 2143
             : '';
2144 2144
 
2145 2145
         return sprintf(
2146 2146
             '%s %sIN %s',
2147
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2147
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2148 2148
             ($instanceOfExpr->not ? 'NOT ' : ''),
2149 2149
             $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr)
2150 2150
         );
@@ -2191,8 +2191,8 @@  discard block
 block discarded – undo
2191 2191
             $sql .= ' NOT';
2192 2192
         }
2193 2193
 
2194
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2195
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2194
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2195
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2196 2196
 
2197 2197
         return $sql;
2198 2198
     }
@@ -2207,7 +2207,7 @@  discard block
 block discarded – undo
2207 2207
             ? $this->walkResultVariable($stringExpr)
2208 2208
             : $stringExpr->dispatch($this);
2209 2209
 
2210
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2210
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2211 2211
 
2212 2212
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2213 2213
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2220,7 +2220,7 @@  discard block
 block discarded – undo
2220 2220
         }
2221 2221
 
2222 2222
         if ($likeExpr->escapeChar) {
2223
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2223
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2224 2224
         }
2225 2225
 
2226 2226
         return $sql;
@@ -2247,7 +2247,7 @@  discard block
 block discarded – undo
2247 2247
             ? $leftExpr->dispatch($this)
2248 2248
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2249 2249
 
2250
-        $sql .= ' ' . $compExpr->operator . ' ';
2250
+        $sql .= ' '.$compExpr->operator.' ';
2251 2251
 
2252 2252
         $sql .= ($rightExpr instanceof AST\Node)
2253 2253
             ? $rightExpr->dispatch($this)
@@ -2279,7 +2279,7 @@  discard block
 block discarded – undo
2279 2279
     {
2280 2280
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2281 2281
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2282
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2282
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2283 2283
     }
2284 2284
 
2285 2285
     /**
@@ -2333,7 +2333,7 @@  discard block
 block discarded – undo
2333 2333
 
2334 2334
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2335 2335
 
2336
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2336
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2337 2337
     }
2338 2338
 
2339 2339
     /**
@@ -2346,7 +2346,7 @@  discard block
 block discarded – undo
2346 2346
     public function walkArithmeticPrimary($primary)
2347 2347
     {
2348 2348
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2349
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2349
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2350 2350
         }
2351 2351
 
2352 2352
         if ($primary instanceof AST\Node) {
@@ -2407,7 +2407,7 @@  discard block
 block discarded – undo
2407 2407
             $entityClassName    = $entityClass->getClassName();
2408 2408
 
2409 2409
             if ($entityClassName !== $rootClass->getClassName()) {
2410
-                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2410
+                if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2411 2411
                     throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
2412 2412
                 }
2413 2413
             }
@@ -2419,6 +2419,6 @@  discard block
 block discarded – undo
2419 2419
             $sqlParameterList[] = $this->conn->quote($discriminator);
2420 2420
         }
2421 2421
 
2422
-        return '(' . implode(', ', $sqlParameterList) . ')';
2422
+        return '('.implode(', ', $sqlParameterList).')';
2423 2423
     }
2424 2424
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/AST/Node.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query\AST;
6 6
 
@@ -53,32 +53,32 @@  discard block
 block discarded – undo
53 53
         $str = '';
54 54
 
55 55
         if ($obj instanceof Node) {
56
-            $str .= get_class($obj) . '(' . PHP_EOL;
56
+            $str .= get_class($obj).'('.PHP_EOL;
57 57
             $props = get_object_vars($obj);
58 58
 
59 59
             foreach ($props as $name => $prop) {
60 60
                 $ident += 4;
61
-                $str .= str_repeat(' ', $ident) . '"' . $name . '": '
62
-                      . $this->dump($prop) . ',' . PHP_EOL;
61
+                $str .= str_repeat(' ', $ident).'"'.$name.'": '
62
+                      . $this->dump($prop).','.PHP_EOL;
63 63
                 $ident -= 4;
64 64
             }
65 65
 
66
-            $str .= str_repeat(' ', $ident) . ')';
66
+            $str .= str_repeat(' ', $ident).')';
67 67
         } elseif (is_array($obj)) {
68 68
             $ident += 4;
69 69
             $str .= 'array(';
70 70
             $some = false;
71 71
 
72 72
             foreach ($obj as $k => $v) {
73
-                $str .= PHP_EOL . str_repeat(' ', $ident) . '"'
74
-                      . $k . '" => ' . $this->dump($v) . ',';
73
+                $str .= PHP_EOL.str_repeat(' ', $ident).'"'
74
+                      . $k.'" => '.$this->dump($v).',';
75 75
                 $some = true;
76 76
             }
77 77
 
78 78
             $ident -= 4;
79
-            $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')';
79
+            $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '').')';
80 80
         } elseif (is_object($obj)) {
81
-            $str .= 'instanceof(' . get_class($obj) . ')';
81
+            $str .= 'instanceof('.get_class($obj).')';
82 82
         } else {
83 83
             $str .= var_export($obj, true);
84 84
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools\Console\Command;
6 6
 
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 
166 166
         $matches = array_filter(
167 167
             $this->getMappedEntities($entityManager),
168
-            function ($mappedEntity) use ($entityName) {
169
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
168
+            function($mappedEntity) use ($entityName) {
169
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
170 170
             }
171 171
         );
172 172
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
             $output[] = $this->formatField(
225 225
                 sprintf('  %s', $parentClass->getParent()),
226
-                ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes)
226
+                ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes)
227 227
             );
228 228
         }
229 229
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         }
249 249
 
250 250
         if (is_bool($value)) {
251
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
251
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
252 252
         }
253 253
 
254 254
         if (empty($value)) {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         return $this->formatField(
387 387
             'Entity listeners',
388 388
             array_map(
389
-                function ($entityListener) {
389
+                function($entityListener) {
390 390
                     return get_class($entityListener);
391 391
                 },
392 392
                 $entityListeners
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
 
331 331
             if ($property instanceof FieldMetadata) {
332 332
                 $output = array_merge($output, $this->formatColumn($property));
333
-            }  elseif ($property instanceof AssociationMetadata) {
333
+            } elseif ($property instanceof AssociationMetadata) {
334 334
                 // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance
335 335
                 foreach ($property as $field => $value) {
336 336
                     $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM;
6 6
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
             // Entity deletions come last and need to be in reverse commit order
391 391
             if ($this->entityDeletions) {
392 392
                 foreach (array_reverse($commitOrder) as $committedEntityName) {
393
-                    if (! $this->entityDeletions) {
393
+                    if ( ! $this->entityDeletions) {
394 394
                         break; // just a performance optimisation
395 395
                     }
396 396
 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
         $oid  = spl_object_hash($entity);
476 476
         $data = [];
477 477
 
478
-        if (!isset($this->entityChangeSets[$oid])) {
478
+        if ( ! isset($this->entityChangeSets[$oid])) {
479 479
             return $data;
480 480
         }
481 481
 
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
                     || ! $class->getProperty($name) instanceof FieldMetadata
559 559
                     || ! $class->getProperty($name)->hasValueGenerator()
560 560
                     || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY
561
-                ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
561
+                ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) {
562 562
                 $actualData[$name] = $value;
563 563
             }
564 564
         }
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
                     if ($owner === null) { // cloned
613 613
                         $actualValue->setOwner($entity, $property);
614 614
                     } elseif ($owner !== $entity) { // no clone, we have to fix
615
-                        if (! $actualValue->isInitialized()) {
615
+                        if ( ! $actualValue->isInitialized()) {
616 616
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
617 617
                         }
618 618
 
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
                         // Check if original value exists
651 651
                         if ($orgValue instanceof PersistentCollection) {
652 652
                             // A PersistentCollection was de-referenced, so delete it.
653
-                            if (! $this->isCollectionScheduledForDeletion($orgValue)) {
653
+                            if ( ! $this->isCollectionScheduledForDeletion($orgValue)) {
654 654
                                 $this->scheduleCollectionDeletion($orgValue);
655 655
 
656 656
                                 $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 
674 674
         // Look for changes in associations of the entity
675 675
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
676
-            if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) {
676
+            if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) {
677 677
                 continue;
678 678
             }
679 679
 
@@ -777,13 +777,13 @@  discard block
 block discarded – undo
777 777
         $targetClass    = $this->em->getClassMetadata($targetEntity);
778 778
 
779 779
         foreach ($unwrappedValue as $key => $entry) {
780
-            if (! ($entry instanceof $targetEntity)) {
780
+            if ( ! ($entry instanceof $targetEntity)) {
781 781
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry);
782 782
             }
783 783
 
784 784
             $state = $this->getEntityState($entry, self::STATE_NEW);
785 785
 
786
-            if (! ($entry instanceof $targetEntity)) {
786
+            if ( ! ($entry instanceof $targetEntity)) {
787 787
                 throw ORMException::unexpectedAssociationValue(
788 788
                     $association->getSourceEntity(),
789 789
                     $association->getName(),
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
         $persister = $this->getEntityPersister($class->getClassName());
846 846
         $generationPlan->executeImmediate($this->em, $entity);
847 847
 
848
-        if (! $generationPlan->containsDeferred()) {
848
+        if ( ! $generationPlan->containsDeferred()) {
849 849
             $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity));
850 850
             $this->entityIdentifiers[$oid] = $id;
851 851
         }
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
     {
879 879
         $oid = spl_object_hash($entity);
880 880
 
881
-        if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
881
+        if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) {
882 882
             throw ORMInvalidArgumentException::entityNotManaged($entity);
883 883
         }
884 884
 
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
                     break;
901 901
 
902 902
                 case ($property instanceof FieldMetadata):
903
-                    if (! $property->isPrimaryKey()
903
+                    if ( ! $property->isPrimaryKey()
904 904
                         || ! $property->getValueGenerator()
905 905
                         || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) {
906 906
                         $actualData[$name] = $property->getValue($entity);
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
             // Entity with this $oid after deletion treated as NEW, even if the $oid
1054 1054
             // is obtained by a new entity because the old one went out of scope.
1055 1055
             //$this->entityStates[$oid] = self::STATE_NEW;
1056
-            if (! $class->isIdentifierComposite()) {
1056
+            if ( ! $class->isIdentifierComposite()) {
1057 1057
                 $property = $class->getProperty($class->getSingleIdentifierFieldName());
1058 1058
 
1059 1059
                 if ($property instanceof FieldMetadata && $property->hasValueGenerator()) {
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
         // Calculate dependencies for new nodes
1101 1101
         while ($class = array_pop($newNodes)) {
1102 1102
             foreach ($class->getDeclaredPropertiesIterator() as $property) {
1103
-                if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1103
+                if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) {
1104 1104
                     continue;
1105 1105
                 }
1106 1106
 
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
 
1115 1115
                 $weight = ! array_filter(
1116 1116
                     $property->getJoinColumns(),
1117
-                    function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); }
1117
+                    function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); }
1118 1118
                 );
1119 1119
 
1120 1120
                 $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight);
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
         $persister = $this->getEntityPersister($class->getClassName());
1409 1409
         $id        = $persister->getIdentifier($entity);
1410 1410
 
1411
-        if (! $id) {
1411
+        if ( ! $id) {
1412 1412
             return self::STATE_NEW;
1413 1413
         }
1414 1414
 
@@ -1641,7 +1641,7 @@  discard block
 block discarded – undo
1641 1641
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
1642 1642
 
1643 1643
             default:
1644
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1644
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1645 1645
         }
1646 1646
 
1647 1647
         $this->cascadePersist($entity, $visited);
@@ -1711,7 +1711,7 @@  discard block
 block discarded – undo
1711 1711
             case self::STATE_DETACHED:
1712 1712
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
1713 1713
             default:
1714
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1714
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1715 1715
         }
1716 1716
 
1717 1717
     }
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
         $class = $this->em->getClassMetadata(get_class($entity));
1781 1781
 
1782 1782
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1783
-            if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) {
1783
+            if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) {
1784 1784
                 continue;
1785 1785
             }
1786 1786
 
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
         }
1830 1830
 
1831 1831
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1832
-            if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) {
1832
+            if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) {
1833 1833
                 continue;
1834 1834
             }
1835 1835
 
@@ -1845,7 +1845,7 @@  discard block
 block discarded – undo
1845 1845
 
1846 1846
                 case ($relatedEntities instanceof Collection):
1847 1847
                 case (is_array($relatedEntities)):
1848
-                    if (! ($association instanceof ToManyAssociationMetadata)) {
1848
+                    if ( ! ($association instanceof ToManyAssociationMetadata)) {
1849 1849
                         throw ORMInvalidArgumentException::invalidAssociation(
1850 1850
                             $this->em->getClassMetadata($targetEntity),
1851 1851
                             $association,
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
                     break;
1861 1861
 
1862 1862
                 case ($relatedEntities !== null):
1863
-                    if (! $relatedEntities instanceof $targetEntity) {
1863
+                    if ( ! $relatedEntities instanceof $targetEntity) {
1864 1864
                         throw ORMInvalidArgumentException::invalidAssociation(
1865 1865
                             $this->em->getClassMetadata($targetEntity),
1866 1866
                             $association,
@@ -1891,7 +1891,7 @@  discard block
 block discarded – undo
1891 1891
         $class             = $this->em->getClassMetadata(get_class($entity));
1892 1892
 
1893 1893
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
1894
-            if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) {
1894
+            if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) {
1895 1895
                 continue;
1896 1896
             }
1897 1897
 
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
             case LockMode::NONE === $lockMode:
1976 1976
             case LockMode::PESSIMISTIC_READ === $lockMode:
1977 1977
             case LockMode::PESSIMISTIC_WRITE === $lockMode:
1978
-                if (!$this->em->getConnection()->isTransactionActive()) {
1978
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
1979 1979
                     throw TransactionRequiredException::transactionRequired();
1980 1980
                 }
1981 1981
 
@@ -2195,7 +2195,7 @@  discard block
 block discarded – undo
2195 2195
         }
2196 2196
 
2197 2197
         foreach ($class->getDeclaredPropertiesIterator() as $field => $association) {
2198
-            if (! ($association instanceof AssociationMetadata)) {
2198
+            if ( ! ($association instanceof AssociationMetadata)) {
2199 2199
                 continue;
2200 2200
             }
2201 2201
 
@@ -2244,7 +2244,7 @@  discard block
 block discarded – undo
2244 2244
                 continue;
2245 2245
             }
2246 2246
 
2247
-            if (! $association->isOwningSide()) {
2247
+            if ( ! $association->isOwningSide()) {
2248 2248
                 // use the given entity association
2249 2249
                 if (isset($data[$field]) && is_object($data[$field]) &&
2250 2250
                     isset($this->entityStates[spl_object_hash($data[$field])])) {
@@ -2294,7 +2294,7 @@  discard block
 block discarded – undo
2294 2294
                 $associatedId[$targetField] = $joinColumnValue;
2295 2295
             }
2296 2296
 
2297
-            if (! $associatedId) {
2297
+            if ( ! $associatedId) {
2298 2298
                 // Foreign key is NULL
2299 2299
                 $association->setValue($entity, null);
2300 2300
                 $this->originalEntityData[$oid][$field] = null;
@@ -2303,7 +2303,7 @@  discard block
 block discarded – undo
2303 2303
             }
2304 2304
 
2305 2305
             // @todo guilhermeblanco Can we remove the need of this somehow?
2306
-            if (!isset($hints['fetchMode'][$class->getClassName()][$field])) {
2306
+            if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) {
2307 2307
                 $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode();
2308 2308
             }
2309 2309
 
@@ -2320,7 +2320,7 @@  discard block
 block discarded – undo
2320 2320
                     // If this is an uninitialized proxy, we are deferring eager loads,
2321 2321
                     // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
2322 2322
                     // then we can append this entity for eager loading!
2323
-                    if (!$targetClass->isIdentifierComposite() &&
2323
+                    if ( ! $targetClass->isIdentifierComposite() &&
2324 2324
                         $newValue instanceof GhostObjectInterface &&
2325 2325
                         isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2326 2326
                         $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER &&
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
                             break;
2358 2358
 
2359 2359
                         // Deferred eager load only works for single identifier classes
2360
-                        case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()):
2360
+                        case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()):
2361 2361
                             // TODO: Is there a faster approach?
2362 2362
                             $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($normalizedAssociatedId);
2363 2363
 
@@ -2764,7 +2764,7 @@  discard block
 block discarded – undo
2764 2764
     {
2765 2765
         $class = $this->em->getClassMetadata(get_class($entity));
2766 2766
 
2767
-        if (! $class->getProperty($propertyName)) {
2767
+        if ( ! $class->getProperty($propertyName)) {
2768 2768
             return; // ignore non-persistent fields
2769 2769
         }
2770 2770
 
@@ -2904,7 +2904,7 @@  discard block
 block discarded – undo
2904 2904
      */
2905 2905
     private function afterTransactionComplete()
2906 2906
     {
2907
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2907
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2908 2908
             $persister->afterTransactionComplete();
2909 2909
         });
2910 2910
     }
@@ -2914,7 +2914,7 @@  discard block
 block discarded – undo
2914 2914
      */
2915 2915
     private function afterTransactionRolledBack()
2916 2916
     {
2917
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
2917
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
2918 2918
             $persister->afterTransactionRolledBack();
2919 2919
         });
2920 2920
     }
Please login to merge, or discard this patch.