Failed Conditions
Pull Request — master (#7143)
by Mike
07:18
created
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php 1 patch
Spacing   +17 added lines, -17 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\Mapping;
6 6
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $this->configuration = $configuration;
69 69
         $this->connection = $connection;
70 70
         $this->eventManager = $eventManager;
71
-        $this->driver      = $this->configuration->getMetadataDriverImpl();
71
+        $this->driver = $this->configuration->getMetadataDriverImpl();
72 72
     }
73 73
 
74 74
     /**
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
                 $classMetadata->setCache(clone $parent->getCache());
134 134
             }
135 135
 
136
-            if (! empty($parent->entityListeners) && empty($classMetadata->entityListeners)) {
136
+            if ( ! empty($parent->entityListeners) && empty($classMetadata->entityListeners)) {
137 137
                 $classMetadata->entityListeners = $parent->entityListeners;
138 138
             }
139 139
         }
140 140
 
141
-        if (! $classMetadata->discriminatorMap && $classMetadata->inheritanceType !== InheritanceType::NONE && $classMetadata->isRootEntity()) {
141
+        if ( ! $classMetadata->discriminatorMap && $classMetadata->inheritanceType !== InheritanceType::NONE && $classMetadata->isRootEntity()) {
142 142
             $this->addDefaultDiscriminatorMap($classMetadata);
143 143
         }
144 144
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
     protected function completeRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void
154 154
     {
155
-        if (! $parent || ! $parent->isMappedSuperclass) {
155
+        if ( ! $parent || ! $parent->isMappedSuperclass) {
156 156
             return;
157 157
         }
158 158
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 continue;
171 171
             }
172 172
 
173
-            if (! ($property instanceof ToOneAssociationMetadata)) {
173
+            if ( ! ($property instanceof ToOneAssociationMetadata)) {
174 174
                 continue;
175 175
             }
176 176
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     protected function validateRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void
191 191
     {
192
-        if (! $class->getReflectionClass()) {
192
+        if ( ! $class->getReflectionClass()) {
193 193
             // only validate if there is a reflection class instance
194 194
             return;
195 195
         }
@@ -199,13 +199,13 @@  discard block
 block discarded – undo
199 199
         $class->validateLifecycleCallbacks($this->getReflectionService());
200 200
 
201 201
         // verify inheritance
202
-        if (! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) {
203
-            if (! $parent) {
204
-                if (! $class->discriminatorMap) {
202
+        if ( ! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) {
203
+            if ( ! $parent) {
204
+                if ( ! $class->discriminatorMap) {
205 205
                     throw MappingException::missingDiscriminatorMap($class->getClassName());
206 206
                 }
207 207
 
208
-                if (! $class->discriminatorColumn) {
208
+                if ( ! $class->discriminatorColumn) {
209 209
                     throw MappingException::missingDiscriminatorColumn($class->getClassName());
210 210
                 }
211 211
             }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     private function completeIdentifierGeneratorMappings(ClassMetadata $class) : void
327 327
     {
328 328
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
329
-            if (! $property instanceof FieldMetadata /*&& ! $property instanceof AssocationMetadata*/) {
329
+            if ( ! $property instanceof FieldMetadata /*&& ! $property instanceof AssocationMetadata*/) {
330 330
                 continue;
331 331
             }
332 332
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
     private function completeFieldIdentifierGeneratorMapping(FieldMetadata $field)
338 338
     {
339
-        if (! $field->hasValueGenerator()) {
339
+        if ( ! $field->hasValueGenerator()) {
340 340
             return;
341 341
         }
342 342
 
@@ -388,10 +388,10 @@  discard block
 block discarded – undo
388 388
 
389 389
             case GeneratorType::CUSTOM:
390 390
                 $definition = $generator->getDefinition();
391
-                if (! isset($definition['class'])) {
391
+                if ( ! isset($definition['class'])) {
392 392
                     throw new ORMException(sprintf('Cannot instantiate custom generator, no class has been defined'));
393 393
                 }
394
-                if (! class_exists($definition['class'])) {
394
+                if ( ! class_exists($definition['class'])) {
395 395
                     throw new ORMException(sprintf('Cannot instantiate custom generator : %s', var_export($definition, true))); //$definition['class']));
396 396
                 }
397 397
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
                 break;
404 404
 
405 405
             default:
406
-                throw new ORMException('Unknown generator type: ' . $generator->getType());
406
+                throw new ORMException('Unknown generator type: '.$generator->getType());
407 407
         }
408 408
     }
409 409
 
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
     private function getTargetPlatform() : Platforms\AbstractPlatform
427 427
     {
428
-        if (! $this->targetPlatform) {
428
+        if ( ! $this->targetPlatform) {
429 429
             $this->targetPlatform = $this->connection->getDatabasePlatform();
430 430
         }
431 431
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +5 added lines, -5 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\Mapping;
6 6
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         try {
160 160
             if ($this->cacheDriver) {
161
-                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);
161
+                $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt);
162 162
 
163 163
                 if ($cached instanceof ClassMetadata) {
164 164
                     $this->loadedMetadata[$realClassName] = $cached;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                     foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClass) {
169 169
                         $loadedClassName = $loadedClass->getClassName();
170 170
 
171
-                        $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null);
171
+                        $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, null);
172 172
                     }
173 173
                 }
174 174
             } else {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         } catch (CommonMappingException $loadingException) {
178 178
             $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext);
179 179
 
180
-            if (! $fallbackMetadataResponse) {
180
+            if ( ! $fallbackMetadataResponse) {
181 181
                 throw $loadingException;
182 182
             }
183 183
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
         $parentClasses = [];
264 264
 
265 265
         foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) {
266
-            if (! $this->getDriver()->isTransient($parentClass)) {
266
+            if ( ! $this->getDriver()->isTransient($parentClass)) {
267 267
                 $parentClasses[] = $parentClass;
268 268
             }
269 269
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/DefaultCacheFactoryTest.php 1 patch
Spacing   +2 added lines, -2 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\ORM\Cache;
6 6
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         parent::setUp();
53 53
 
54
-        $this->em            = $this->getTestEntityManager();
54
+        $this->em = $this->getTestEntityManager();
55 55
         /*
56 56
         $this->enableSecondLevelCache();
57 57
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Spacing   +72 added lines, -72 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
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $conn = static::$sharedConn;
347 347
 
348 348
         // In case test is skipped, tearDown is called, but no setup may have run
349
-        if (! $conn) {
349
+        if ( ! $conn) {
350 350
             return;
351 351
         }
352 352
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         }
421 421
 
422 422
         if (isset($this->usedModelSets['directorytree'])) {
423
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file'));
423
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file'));
424 424
             // MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
425 425
             $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
426 426
             $conn->executeUpdate('DELETE FROM Directory');
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
                 )
514 514
             );
515 515
 
516
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups'));
517
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group'));
518
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone'));
519
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user'));
520
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address'));
521
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city'));
516
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups'));
517
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group'));
518
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone'));
519
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user'));
520
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address'));
521
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city'));
522 522
         }
523 523
 
524 524
         if (isset($this->usedModelSets['vct_onetoone'])) {
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
         $classes = [];
632 632
 
633 633
         foreach ($classNames as $className) {
634
-            if (! isset(static::$entityTablesCreated[$className])) {
634
+            if ( ! isset(static::$entityTablesCreated[$className])) {
635 635
                 static::$entityTablesCreated[$className] = true;
636 636
                 $classes[]                               = $this->em->getClassMetadata($className);
637 637
             }
@@ -651,25 +651,25 @@  discard block
 block discarded – undo
651 651
     {
652 652
         $this->setUpDBALTypes();
653 653
 
654
-        if (! isset(static::$sharedConn)) {
654
+        if ( ! isset(static::$sharedConn)) {
655 655
             static::$sharedConn = TestUtil::getConnection();
656 656
         }
657 657
 
658 658
         if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) {
659 659
             if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) {
660
-                static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/');
660
+                static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/');
661 661
             } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') {
662
-                static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual');
662
+                static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual');
663 663
             }
664 664
         }
665 665
 
666
-        if (! $this->em) {
666
+        if ( ! $this->em) {
667 667
             $this->em         = $this->getEntityManager();
668 668
             $this->schemaTool = new SchemaTool($this->em);
669 669
         }
670 670
 
671 671
         foreach ($this->usedModelSets as $setName => $bool) {
672
-            if (! isset(static::$tablesCreated[$setName])) {
672
+            if ( ! isset(static::$tablesCreated[$setName])) {
673 673
                 $this->setUpEntitySchema(static::$modelSets[$setName]);
674 674
 
675 675
                 static::$tablesCreated[$setName] = true;
@@ -744,65 +744,65 @@  discard block
 block discarded – undo
744 744
 
745 745
         $config->setMetadataDriverImpl(
746 746
             $mappingDriver ?? $config->newDefaultAnnotationDriver([
747
-                realpath(__DIR__ . '/Models/CMS'),
748
-                realpath(__DIR__ . '/Models/Cache'),
747
+                realpath(__DIR__.'/Models/CMS'),
748
+                realpath(__DIR__.'/Models/Cache'),
749 749
 
750
-                realpath(__DIR__ . '/Models/Company'),
751
-                realpath(__DIR__ . '/Models/CompositeKeyInheritance'),
750
+                realpath(__DIR__.'/Models/Company'),
751
+                realpath(__DIR__.'/Models/CompositeKeyInheritance'),
752 752
                 //realpath(__DIR__ . '/Models/CustomType'),
753
-                realpath(__DIR__ . '/Models/DDC117'),
754
-                realpath(__DIR__ . '/Models/DDC1476'),
755
-                realpath(__DIR__ . '/Models/DDC1590'),
756
-                realpath(__DIR__ . '/Models/DDC1872'),
753
+                realpath(__DIR__.'/Models/DDC117'),
754
+                realpath(__DIR__.'/Models/DDC1476'),
755
+                realpath(__DIR__.'/Models/DDC1590'),
756
+                realpath(__DIR__.'/Models/DDC1872'),
757 757
                 //realpath(__DIR__ . '/Models/DDC2372'),
758
-                realpath(__DIR__ . '/Models/DDC2504'),
759
-                realpath(__DIR__ . '/Models/DDC2825'),
760
-                realpath(__DIR__ . '/Models/DDC3231'),
761
-                realpath(__DIR__ . '/Models/DDC3293'),
762
-                realpath(__DIR__ . '/Models/DDC3346'),
763
-                realpath(__DIR__ . '/Models/DDC3579'),
764
-                realpath(__DIR__ . '/Models/DDC3597'),
765
-                realpath(__DIR__ . '/Models/DDC3699'),
766
-                realpath(__DIR__ . '/Models/DDC3711'),
767
-                realpath(__DIR__ . '/Models/DDC3899'),
758
+                realpath(__DIR__.'/Models/DDC2504'),
759
+                realpath(__DIR__.'/Models/DDC2825'),
760
+                realpath(__DIR__.'/Models/DDC3231'),
761
+                realpath(__DIR__.'/Models/DDC3293'),
762
+                realpath(__DIR__.'/Models/DDC3346'),
763
+                realpath(__DIR__.'/Models/DDC3579'),
764
+                realpath(__DIR__.'/Models/DDC3597'),
765
+                realpath(__DIR__.'/Models/DDC3699'),
766
+                realpath(__DIR__.'/Models/DDC3711'),
767
+                realpath(__DIR__.'/Models/DDC3899'),
768 768
                 //realpath(__DIR__ . '/Models/DDC4006'),
769 769
                 //realpath(__DIR__ . '/Models/DDC5934'),
770
-                realpath(__DIR__ . '/Models/DDC6412'),
771
-                realpath(__DIR__ . '/Models/DDC753'),
772
-                realpath(__DIR__ . '/Models/DDC869'),
770
+                realpath(__DIR__.'/Models/DDC6412'),
771
+                realpath(__DIR__.'/Models/DDC753'),
772
+                realpath(__DIR__.'/Models/DDC869'),
773 773
                 //realpath(__DIR__ . '/Models/DDC889'),
774
-                realpath(__DIR__ . '/Models/DDC964'),
775
-                realpath(__DIR__ . '/Models/DirectoryTree'),
776
-                realpath(__DIR__ . '/Models/ECommerce'),
777
-                realpath(__DIR__ . '/Models/Forum'),
778
-                realpath(__DIR__ . '/Models/FriendObject'),
779
-                realpath(__DIR__ . '/Models/Generic'),
780
-                realpath(__DIR__ . '/Models/GeoNames'),
781
-                realpath(__DIR__ . '/Models/Global'),
782
-                realpath(__DIR__ . '/Models/Hydration'),
783
-                realpath(__DIR__ . '/Models/IdentityIsAssociation'),
784
-                realpath(__DIR__ . '/Models/Issue5989'),
785
-                realpath(__DIR__ . '/Models/JoinedInheritanceType'),
786
-                realpath(__DIR__ . '/Models/Legacy'),
787
-                realpath(__DIR__ . '/Models/ManyToManyPersister'),
788
-                realpath(__DIR__ . '/Models/MixedToOneIdentity'),
789
-                realpath(__DIR__ . '/Models/Navigation'),
790
-                realpath(__DIR__ . '/Models/NonPublicSchemaJoins'),
791
-                realpath(__DIR__ . '/Models/NullDefault'),
792
-                realpath(__DIR__ . '/Models/OneToOneInverseSideLoad'),
793
-                realpath(__DIR__ . '/Models/OneToOneSingleTableInheritance'),
794
-                realpath(__DIR__ . '/Models/Pagination'),
795
-                realpath(__DIR__ . '/Models/ProxySpecifics'),
796
-                realpath(__DIR__ . '/Models/Quote'),
797
-                realpath(__DIR__ . '/Models/Reflection'),
798
-                realpath(__DIR__ . '/Models/Routing'),
799
-                realpath(__DIR__ . '/Models/StockExchange'),
800
-                realpath(__DIR__ . '/Models/Taxi'),
801
-                realpath(__DIR__ . '/Models/Tweet'),
802
-                realpath(__DIR__ . '/Models/ValueConversionType'),
803
-                realpath(__DIR__ . '/Models/ValueObjects'),
804
-                realpath(__DIR__ . '/Models/VersionedManyToOne'),
805
-                realpath(__DIR__ . '/Models/VersionedOneToOne'),
774
+                realpath(__DIR__.'/Models/DDC964'),
775
+                realpath(__DIR__.'/Models/DirectoryTree'),
776
+                realpath(__DIR__.'/Models/ECommerce'),
777
+                realpath(__DIR__.'/Models/Forum'),
778
+                realpath(__DIR__.'/Models/FriendObject'),
779
+                realpath(__DIR__.'/Models/Generic'),
780
+                realpath(__DIR__.'/Models/GeoNames'),
781
+                realpath(__DIR__.'/Models/Global'),
782
+                realpath(__DIR__.'/Models/Hydration'),
783
+                realpath(__DIR__.'/Models/IdentityIsAssociation'),
784
+                realpath(__DIR__.'/Models/Issue5989'),
785
+                realpath(__DIR__.'/Models/JoinedInheritanceType'),
786
+                realpath(__DIR__.'/Models/Legacy'),
787
+                realpath(__DIR__.'/Models/ManyToManyPersister'),
788
+                realpath(__DIR__.'/Models/MixedToOneIdentity'),
789
+                realpath(__DIR__.'/Models/Navigation'),
790
+                realpath(__DIR__.'/Models/NonPublicSchemaJoins'),
791
+                realpath(__DIR__.'/Models/NullDefault'),
792
+                realpath(__DIR__.'/Models/OneToOneInverseSideLoad'),
793
+                realpath(__DIR__.'/Models/OneToOneSingleTableInheritance'),
794
+                realpath(__DIR__.'/Models/Pagination'),
795
+                realpath(__DIR__.'/Models/ProxySpecifics'),
796
+                realpath(__DIR__.'/Models/Quote'),
797
+                realpath(__DIR__.'/Models/Reflection'),
798
+                realpath(__DIR__.'/Models/Routing'),
799
+                realpath(__DIR__.'/Models/StockExchange'),
800
+                realpath(__DIR__.'/Models/Taxi'),
801
+                realpath(__DIR__.'/Models/Tweet'),
802
+                realpath(__DIR__.'/Models/ValueConversionType'),
803
+                realpath(__DIR__.'/Models/ValueObjects'),
804
+                realpath(__DIR__.'/Models/VersionedManyToOne'),
805
+                realpath(__DIR__.'/Models/VersionedOneToOne'),
806 806
 
807 807
             ])
808 808
         );
@@ -853,13 +853,13 @@  discard block
 block discarded – undo
853 853
 
854 854
             foreach ($last25queries as $i => $query) {
855 855
                 $params = array_map(
856
-                    function ($p) {
856
+                    function($p) {
857 857
                         return is_object($p) ? get_class($p) : var_export($p, true);
858 858
                     },
859 859
                     $query['params'] ?: []
860 860
                 );
861 861
 
862
-                $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL;
862
+                $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL;
863 863
             }
864 864
 
865 865
             $trace    = $e->getTrace();
@@ -872,11 +872,11 @@  discard block
 block discarded – undo
872 872
                         break;
873 873
                     }
874 874
 
875
-                    $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL;
875
+                    $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL;
876 876
                 }
877 877
             }
878 878
 
879
-            $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg;
879
+            $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg;
880 880
 
881 881
             throw new \Exception($message, (int) $e->getCode(), $e);
882 882
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmTestCase.php 1 patch
Spacing   +53 added lines, -53 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
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache());
68 68
 
69
-        Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php');
69
+        Annotations\AnnotationRegistry::registerFile(__DIR__.'/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php');
70 70
 
71 71
         return new AnnotationDriver($reader, (array) $paths);
72 72
     }
@@ -105,64 +105,64 @@  discard block
 block discarded – undo
105 105
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
106 106
         $config->setMetadataDriverImpl(
107 107
             $config->newDefaultAnnotationDriver([
108
-                realpath(__DIR__ . '/Models/Cache'),
109
-                realpath(__DIR__ . '/Models/DDC1476'),
110
-                realpath(__DIR__ . '/Models/DDC3231'),
111
-                realpath(__DIR__ . '/Models/DDC3711'),
112
-                realpath(__DIR__ . '/Models/DDC869'),
113
-                realpath(__DIR__ . '/Models/FriendObject'),
114
-                realpath(__DIR__ . '/Models/Issue5989'),
115
-                realpath(__DIR__ . '/Models/NonPublicSchemaJoins'),
116
-                realpath(__DIR__ . '/Models/Quote'),
108
+                realpath(__DIR__.'/Models/Cache'),
109
+                realpath(__DIR__.'/Models/DDC1476'),
110
+                realpath(__DIR__.'/Models/DDC3231'),
111
+                realpath(__DIR__.'/Models/DDC3711'),
112
+                realpath(__DIR__.'/Models/DDC869'),
113
+                realpath(__DIR__.'/Models/FriendObject'),
114
+                realpath(__DIR__.'/Models/Issue5989'),
115
+                realpath(__DIR__.'/Models/NonPublicSchemaJoins'),
116
+                realpath(__DIR__.'/Models/Quote'),
117 117
                 //realpath(__DIR__ . '/Models/ValueConversionType'),
118
-                realpath(__DIR__ . '/Models/CMS'),
119
-                realpath(__DIR__ . '/Models/DDC1590'),
120
-                realpath(__DIR__ . '/Models/DDC3293'),
121
-                realpath(__DIR__ . '/Models/DDC3899'),
118
+                realpath(__DIR__.'/Models/CMS'),
119
+                realpath(__DIR__.'/Models/DDC1590'),
120
+                realpath(__DIR__.'/Models/DDC3293'),
121
+                realpath(__DIR__.'/Models/DDC3899'),
122 122
                 //realpath(__DIR__ . '/Models/DDC889'),
123
-                realpath(__DIR__ . '/Models/Generic'),
124
-                realpath(__DIR__ . '/Models/JoinedInheritanceType'),
125
-                realpath(__DIR__ . '/Models/NullDefault'),
126
-                realpath(__DIR__ . '/Models/Reflection'),
127
-                realpath(__DIR__ . '/Models/ValueObjects'),
128
-                realpath(__DIR__ . '/Models/Company'),
129
-                realpath(__DIR__ . '/Models/DDC1872'),
130
-                realpath(__DIR__ . '/Models/DDC3346'),
123
+                realpath(__DIR__.'/Models/Generic'),
124
+                realpath(__DIR__.'/Models/JoinedInheritanceType'),
125
+                realpath(__DIR__.'/Models/NullDefault'),
126
+                realpath(__DIR__.'/Models/Reflection'),
127
+                realpath(__DIR__.'/Models/ValueObjects'),
128
+                realpath(__DIR__.'/Models/Company'),
129
+                realpath(__DIR__.'/Models/DDC1872'),
130
+                realpath(__DIR__.'/Models/DDC3346'),
131 131
                 //realpath(__DIR__ . '/Models/DDC4006'),
132
-                realpath(__DIR__ . '/Models/DDC964'),
133
-                realpath(__DIR__ . '/Models/GeoNames'),
134
-                realpath(__DIR__ . '/Models/Legacy'),
135
-                realpath(__DIR__ . '/Models/OneToOneInverseSideLoad'),
136
-                realpath(__DIR__ . '/Models/Routing'),
137
-                realpath(__DIR__ . '/Models/VersionedManyToOne'),
138
-                realpath(__DIR__ . '/Models/CompositeKeyInheritance'),
132
+                realpath(__DIR__.'/Models/DDC964'),
133
+                realpath(__DIR__.'/Models/GeoNames'),
134
+                realpath(__DIR__.'/Models/Legacy'),
135
+                realpath(__DIR__.'/Models/OneToOneInverseSideLoad'),
136
+                realpath(__DIR__.'/Models/Routing'),
137
+                realpath(__DIR__.'/Models/VersionedManyToOne'),
138
+                realpath(__DIR__.'/Models/CompositeKeyInheritance'),
139 139
                 //realpath(__DIR__ . '/Models/DDC2372'),
140
-                realpath(__DIR__ . '/Models/DDC3579'),
140
+                realpath(__DIR__.'/Models/DDC3579'),
141 141
                 //realpath(__DIR__ . '/Models/DDC5934'),
142
-                realpath(__DIR__ . '/Models/DirectoryTree'),
143
-                realpath(__DIR__ . '/Models/Global'),
144
-                realpath(__DIR__ . '/Models/ManyToManyPersister'),
145
-                realpath(__DIR__ . '/Models/OneToOneSingleTableInheritance'),
146
-                realpath(__DIR__ . '/Models/StockExchange'),
147
-                realpath(__DIR__ . '/Models/VersionedOneToOne'),
142
+                realpath(__DIR__.'/Models/DirectoryTree'),
143
+                realpath(__DIR__.'/Models/Global'),
144
+                realpath(__DIR__.'/Models/ManyToManyPersister'),
145
+                realpath(__DIR__.'/Models/OneToOneSingleTableInheritance'),
146
+                realpath(__DIR__.'/Models/StockExchange'),
147
+                realpath(__DIR__.'/Models/VersionedOneToOne'),
148 148
                 //realpath(__DIR__ . '/Models/CustomType'),
149
-                realpath(__DIR__ . '/Models/DDC2504'),
150
-                realpath(__DIR__ . '/Models/DDC3597'),
149
+                realpath(__DIR__.'/Models/DDC2504'),
150
+                realpath(__DIR__.'/Models/DDC3597'),
151 151
                 //realpath(__DIR__ . '/Models/DDC6412'),
152
-                realpath(__DIR__ . '/Models/ECommerce'),
153
-                realpath(__DIR__ . '/Models/Hydration'),
152
+                realpath(__DIR__.'/Models/ECommerce'),
153
+                realpath(__DIR__.'/Models/Hydration'),
154 154
                 //realpath(__DIR__ . '/Models/MixedToOneIdentity'),
155
-                realpath(__DIR__ . '/Models/Pagination'),
156
-                realpath(__DIR__ . '/Models/Taxi'),
157
-                realpath(__DIR__ . '/Models/DDC117'),
158
-                realpath(__DIR__ . '/Models/DDC2825'),
159
-                realpath(__DIR__ . '/Models/DDC3699'),
160
-                realpath(__DIR__ . '/Models/DDC753'),
161
-                realpath(__DIR__ . '/Models/Forum'),
162
-                realpath(__DIR__ . '/Models/IdentityIsAssociation'),
163
-                realpath(__DIR__ . '/Models/Navigation'),
164
-                realpath(__DIR__ . '/Models/ProxySpecifics'),
165
-                realpath(__DIR__ . '/Models/Tweet'),
155
+                realpath(__DIR__.'/Models/Pagination'),
156
+                realpath(__DIR__.'/Models/Taxi'),
157
+                realpath(__DIR__.'/Models/DDC117'),
158
+                realpath(__DIR__.'/Models/DDC2825'),
159
+                realpath(__DIR__.'/Models/DDC3699'),
160
+                realpath(__DIR__.'/Models/DDC753'),
161
+                realpath(__DIR__.'/Models/Forum'),
162
+                realpath(__DIR__.'/Models/IdentityIsAssociation'),
163
+                realpath(__DIR__.'/Models/Navigation'),
164
+                realpath(__DIR__.'/Models/ProxySpecifics'),
165
+                realpath(__DIR__.'/Models/Tweet'),
166 166
             ])
167 167
         );
168 168
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $eventManager = new EventManager();
196 196
         }
197 197
 
198
-        if (! ($metadatas instanceof MetadataCollection)){
198
+        if ( ! ($metadatas instanceof MetadataCollection)) {
199 199
             $metadataFactory = new ClassMetadataFactory($config, $conn, $eventManager);
200 200
             $metadatas = MetadataCollection::fromClassMetadatas(...$metadataFactory->getAllMetadata());
201 201
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +20 added lines, -20 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
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     {
258 258
         $query = new Query($this);
259 259
 
260
-        if (! empty($dql)) {
260
+        if ( ! empty($dql)) {
261 261
             $query->setDQL($dql);
262 262
         }
263 263
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $class     = $this->mappings->get($entityName);
348 348
         $className = $class->getClassName();
349 349
 
350
-        if (! is_array($id)) {
350
+        if ( ! is_array($id)) {
351 351
             if ($class->isIdentifierComposite()) {
352 352
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
353 353
             }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
         foreach ($id as $i => $value) {
359 359
             if (is_object($value)) {
360
-                try{
360
+                try {
361 361
                     $this->mappings->get($value);
362 362
                     $id[$i] = $this->unitOfWork->getSingleIdentifierValue($value);
363 363
                 } catch (\Exception $e) {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $sortedId = [];
374 374
 
375 375
         foreach ($class->identifier as $identifier) {
376
-            if (! isset($id[$identifier])) {
376
+            if ( ! isset($id[$identifier])) {
377 377
                 throw ORMException::missingIdentifierField($className, $identifier);
378 378
             }
379 379
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         // Check identity map first
391 391
         $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName());
392 392
         if ($entity !== false) {
393
-            if (! ($entity instanceof $className)) {
393
+            if ( ! ($entity instanceof $className)) {
394 394
                 return null;
395 395
             }
396 396
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 
415 415
         switch (true) {
416 416
             case $lockMode === LockMode::OPTIMISTIC:
417
-                if (! $class->isVersioned()) {
417
+                if ( ! $class->isVersioned()) {
418 418
                     throw OptimisticLockException::notVersioned($className);
419 419
                 }
420 420
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
             case $lockMode === LockMode::PESSIMISTIC_READ:
428 428
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
429
-                if (! $this->getConnection()->isTransactionActive()) {
429
+                if ( ! $this->getConnection()->isTransactionActive()) {
430 430
                     throw TransactionRequiredException::transactionRequired();
431 431
                 }
432 432
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         $class     = $this->mappings->get($entityName);
446 446
         $className = $class->getClassName();
447 447
 
448
-        if (! is_array($id)) {
448
+        if ( ! is_array($id)) {
449 449
             if ($class->isIdentifierComposite()) {
450 450
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
451 451
             }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             $scalarId[$i] = $value;
460 460
 
461 461
             if (is_object($value)) {
462
-                try{
462
+                try {
463 463
                     $this->mappings->get($value);
464 464
                     $scalarId[$i] = $this->unitOfWork->getSingleIdentifierValue($value);
465 465
                 } catch (\Exception $e) {
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
         $sortedId = [];
476 476
 
477 477
         foreach ($class->identifier as $identifier) {
478
-            if (! isset($scalarId[$identifier])) {
478
+            if ( ! isset($scalarId[$identifier])) {
479 479
                 throw ORMException::missingIdentifierField($className, $identifier);
480 480
             }
481 481
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
         $class     = $this->mappings->get($entityName);
517 517
         $className = $class->getClassName();
518 518
 
519
-        if (! is_array($id)) {
519
+        if ( ! is_array($id)) {
520 520
             if ($class->isIdentifierComposite()) {
521 521
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
522 522
             }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 
527 527
         foreach ($id as $i => $value) {
528 528
             if (is_object($value)) {
529
-                try{
529
+                try {
530 530
                     $this->mappings->get($value);
531 531
                     $id[$i] = $this->unitOfWork->getSingleIdentifierValue($value);
532 532
                 } catch (\Exception $e) {
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
         $sortedId = [];
543 543
 
544 544
         foreach ($class->identifier as $identifier) {
545
-            if (! isset($id[$identifier])) {
545
+            if ( ! isset($id[$identifier])) {
546 546
                 throw ORMException::missingIdentifierField($className, $identifier);
547 547
             }
548 548
 
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      */
616 616
     public function persist($entity)
617 617
     {
618
-        if (! is_object($entity)) {
618
+        if ( ! is_object($entity)) {
619 619
             throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity);
620 620
         }
621 621
 
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
      */
638 638
     public function remove($entity)
639 639
     {
640
-        if (! is_object($entity)) {
640
+        if ( ! is_object($entity)) {
641 641
             throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity);
642 642
         }
643 643
 
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
      */
658 658
     public function refresh($entity)
659 659
     {
660
-        if (! is_object($entity)) {
660
+        if ( ! is_object($entity)) {
661 661
             throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity);
662 662
         }
663 663
 
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
      */
813 813
     public static function create($connection, Configuration $config, EventManager $eventManager)
814 814
     {
815
-        if (! $config->getMetadataDriverImpl()) {
815
+        if ( ! $config->getMetadataDriverImpl()) {
816 816
             throw ORMException::missingMappingDriverImpl();
817 817
         }
818 818
 
@@ -855,12 +855,12 @@  discard block
 block discarded – undo
855 855
             return DriverManager::getConnection($connection, $config, $eventManager ?: new EventManager());
856 856
         }
857 857
 
858
-        if (! $connection instanceof Connection) {
858
+        if ( ! $connection instanceof Connection) {
859 859
             throw new \InvalidArgumentException(
860 860
                 sprintf(
861 861
                     'Invalid $connection argument of type %s given%s.',
862 862
                     is_object($connection) ? get_class($connection) : gettype($connection),
863
-                    is_object($connection) ? '' : ': "' . $connection . '"'
863
+                    is_object($connection) ? '' : ': "'.$connection.'"'
864 864
                 )
865 865
             );
866 866
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +81 added lines, -81 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,16 +300,16 @@  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) {
303
+            function($columnName) {
304 304
                 return $this->platform->quoteIdentifier($columnName);
305 305
             },
306 306
             array_keys($versionedClass->getIdentifierColumns($this->em))
307 307
         );
308 308
 
309 309
         // FIXME: Order with composite keys might not be correct
310
-        $sql = 'SELECT ' . $columnName
311
-             . ' FROM ' . $tableName
312
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
310
+        $sql = 'SELECT '.$columnName
311
+             . ' FROM '.$tableName
312
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
313 313
 
314 314
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
315 315
         $versionType = $versionProperty->getType();
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
         $tableName  = $this->class->getTableName();
349 349
         $updateData = $this->prepareUpdateData($entity);
350 350
 
351
-        if (! isset($updateData[$tableName])) {
351
+        if ( ! isset($updateData[$tableName])) {
352 352
             return;
353 353
         }
354 354
 
355 355
         $data = $updateData[$tableName];
356 356
 
357
-        if (! $data) {
357
+        if ( ! $data) {
358 358
             return;
359 359
         }
360 360
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 
408 408
             if ($value !== null) {
409 409
                 // @todo guilhermeblanco Make sure we do not have flat association values.
410
-                if (! is_array($value)) {
410
+                if ( ! is_array($value)) {
411 411
                     $value = [$targetClass->identifier[0] => $value];
412 412
                 }
413 413
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
421 421
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
422 422
 
423
-                if (! $joinColumn->getType()) {
423
+                if ( ! $joinColumn->getType()) {
424 424
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
425 425
                 }
426 426
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
487 487
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
488 488
 
489
-                        if (! $joinColumn->getType()) {
489
+                        if ( ! $joinColumn->getType()) {
490 490
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
491 491
                         }
492 492
 
@@ -513,18 +513,18 @@  discard block
 block discarded – undo
513 513
                 case Type::SMALLINT:
514 514
                 case Type::INTEGER:
515 515
                 case Type::BIGINT:
516
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
516
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
517 517
                     break;
518 518
 
519 519
                 case Type::DATETIME:
520
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
520
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
521 521
                     break;
522 522
             }
523 523
         }
524 524
 
525
-        $sql = 'UPDATE ' . $quotedTableName
526
-             . ' SET ' . implode(', ', $set)
527
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
525
+        $sql = 'UPDATE '.$quotedTableName
526
+             . ' SET '.implode(', ', $set)
527
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
528 528
 
529 529
         $result = $this->conn->executeUpdate($sql, $params, $types);
530 530
 
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
     protected function deleteJoinTableRecords($identifier)
542 542
     {
543 543
         foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
544
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
544
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
545 545
                 continue;
546 546
             }
547 547
 
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
             $otherKeys         = [];
554 554
             $keys              = [];
555 555
 
556
-            if (! $owningAssociation->isOwningSide()) {
556
+            if ( ! $owningAssociation->isOwningSide()) {
557 557
                 $class             = $this->em->getClassMetadata($association->getTargetEntity());
558 558
                 $owningAssociation = $class->getProperty($association->getMappedBy());
559 559
             }
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
             }
667 667
 
668 668
             // Only owning side of x-1 associations can have a FK column.
669
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
669
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
670 670
                 continue;
671 671
             }
672 672
 
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
                 /** @var JoinColumnMetadata $joinColumn */
687 687
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
688 688
 
689
-                if (! $joinColumn->getType()) {
689
+                if ( ! $joinColumn->getType()) {
690 690
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
691 691
                 }
692 692
 
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
         $propertyName = $this->class->fieldNames[$columnName];
715 715
         $property     = $this->class->getProperty($propertyName);
716 716
 
717
-        if (! $property) {
717
+        if ( ! $property) {
718 718
             return null;
719 719
         }
720 720
 
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
             /** @var JoinColumnMetadata $joinColumn */
734 734
             $referencedColumnName = $joinColumn->getReferencedColumnName();
735 735
 
736
-            if (! $joinColumn->getType()) {
736
+            if ( ! $joinColumn->getType()) {
737 737
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
738 738
             }
739 739
 
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
             $sourceKeyColumn = $joinColumn->getReferencedColumnName();
839 839
             $targetKeyColumn = $joinColumn->getColumnName();
840 840
 
841
-            if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
841
+            if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
842 842
                 throw MappingException::joinColumnMustPointToMappedField(
843 843
                     $sourceClass->getClassName(),
844 844
                     $sourceKeyColumn
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
         $criteria    = [];
1066 1066
         $parameters  = [];
1067 1067
 
1068
-        if (! $association->isOwningSide()) {
1068
+        if ( ! $association->isOwningSide()) {
1069 1069
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1070 1070
             $owningAssoc = $class->getProperty($association->getMappedBy());
1071 1071
         }
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
                 $value = $value[$targetClass->identifier[0]];
1095 1095
             }
1096 1096
 
1097
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1097
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1098 1098
             $parameters[]                                       = [
1099 1099
                 'value' => $value,
1100 1100
                 'field' => $fieldName,
@@ -1144,11 +1144,11 @@  discard block
 block discarded – undo
1144 1144
 
1145 1145
         switch ($lockMode) {
1146 1146
             case LockMode::PESSIMISTIC_READ:
1147
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1147
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1148 1148
                 break;
1149 1149
 
1150 1150
             case LockMode::PESSIMISTIC_WRITE:
1151
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1151
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1152 1152
                 break;
1153 1153
         }
1154 1154
 
@@ -1159,14 +1159,14 @@  discard block
 block discarded – undo
1159 1159
 
1160 1160
         if ($filterSql !== '') {
1161 1161
             $conditionSql = $conditionSql
1162
-                ? $conditionSql . ' AND ' . $filterSql
1162
+                ? $conditionSql.' AND '.$filterSql
1163 1163
                 : $filterSql;
1164 1164
         }
1165 1165
 
1166
-        $select = 'SELECT ' . $columnList;
1167
-        $from   = ' FROM ' . $tableName . ' ' . $tableAlias;
1168
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1169
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1166
+        $select = 'SELECT '.$columnList;
1167
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1168
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1169
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1170 1170
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1171 1171
         $query  = $select
1172 1172
             . $lock
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
             . $where
1175 1175
             . $orderBySql;
1176 1176
 
1177
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1177
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1178 1178
     }
1179 1179
 
1180 1180
     /**
@@ -1193,13 +1193,13 @@  discard block
 block discarded – undo
1193 1193
 
1194 1194
         if ($filterSql !== '') {
1195 1195
             $conditionSql = $conditionSql
1196
-                ? $conditionSql . ' AND ' . $filterSql
1196
+                ? $conditionSql.' AND '.$filterSql
1197 1197
                 : $filterSql;
1198 1198
         }
1199 1199
 
1200 1200
         $sql = 'SELECT COUNT(*) '
1201
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1202
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1201
+            . 'FROM '.$tableName.' '.$tableAlias
1202
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1203 1203
 
1204 1204
         return $sql;
1205 1205
     }
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
      */
1217 1217
     final protected function getOrderBySQL(array $orderBy, $baseTableAlias)
1218 1218
     {
1219
-        if (! $orderBy) {
1219
+        if ( ! $orderBy) {
1220 1220
             return '';
1221 1221
         }
1222 1222
 
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
         foreach ($orderBy as $fieldName => $orientation) {
1226 1226
             $orientation = strtoupper(trim($orientation));
1227 1227
 
1228
-            if (! in_array($orientation, ['ASC', 'DESC'], true)) {
1228
+            if ( ! in_array($orientation, ['ASC', 'DESC'], true)) {
1229 1229
                 throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName);
1230 1230
             }
1231 1231
 
@@ -1235,11 +1235,11 @@  discard block
 block discarded – undo
1235 1235
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1236 1236
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1237 1237
 
1238
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1238
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1239 1239
 
1240 1240
                 continue;
1241 1241
             } elseif ($property instanceof AssociationMetadata) {
1242
-                if (! $property->isOwningSide()) {
1242
+                if ( ! $property->isOwningSide()) {
1243 1243
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName);
1244 1244
                 }
1245 1245
 
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
                     /** @var JoinColumnMetadata $joinColumn */
1253 1253
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1254 1254
 
1255
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1255
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1256 1256
                 }
1257 1257
 
1258 1258
                 continue;
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
             throw ORMException::unrecognizedField($fieldName);
1262 1262
         }
1263 1263
 
1264
-        return ' ORDER BY ' . implode(', ', $orderByList);
1264
+        return ' ORDER BY '.implode(', ', $orderByList);
1265 1265
     }
1266 1266
 
1267 1267
     /**
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
                     $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide();
1304 1304
                     $isAssocFromOneEager     = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER;
1305 1305
 
1306
-                    if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1306
+                    if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1307 1307
                         break;
1308 1308
                     }
1309 1309
 
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
                         break; // now this is why you shouldn't use inheritance
1319 1319
                     }
1320 1320
 
1321
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1321
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1322 1322
 
1323 1323
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1324 1324
 
@@ -1346,14 +1346,14 @@  discard block
 block discarded – undo
1346 1346
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1347 1347
                     }
1348 1348
 
1349
-                    if (! $property->isOwningSide()) {
1349
+                    if ( ! $property->isOwningSide()) {
1350 1350
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1351 1351
                     }
1352 1352
 
1353 1353
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1354 1354
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1355 1355
 
1356
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1356
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1357 1357
 
1358 1358
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1359 1359
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
                         $joinCondition[] = $filterSql;
1378 1378
                     }
1379 1379
 
1380
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1380
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1381 1381
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1382 1382
 
1383 1383
                     break;
@@ -1399,7 +1399,7 @@  discard block
 block discarded – undo
1399 1399
      */
1400 1400
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1401 1401
     {
1402
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1402
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1403 1403
             return '';
1404 1404
         }
1405 1405
 
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
             $referencedColumnName = $joinColumn->getReferencedColumnName();
1415 1415
             $resultColumnName     = $this->getSQLColumnAlias();
1416 1416
 
1417
-            if (! $joinColumn->getType()) {
1417
+            if ( ! $joinColumn->getType()) {
1418 1418
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1419 1419
             }
1420 1420
 
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
         $owningAssociation = $association;
1445 1445
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1446 1446
 
1447
-        if (! $association->isOwningSide()) {
1447
+        if ( ! $association->isOwningSide()) {
1448 1448
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1449 1449
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1450 1450
         }
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
             );
1467 1467
         }
1468 1468
 
1469
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1469
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1470 1470
     }
1471 1471
 
1472 1472
     /**
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
                             $columnName           = $joinColumn->getColumnName();
1562 1562
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1563 1563
 
1564
-                            if (! $joinColumn->getType()) {
1564
+                            if ( ! $joinColumn->getType()) {
1565 1565
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1566 1566
                             }
1567 1567
 
@@ -1600,7 +1600,7 @@  discard block
 block discarded – undo
1600 1600
 
1601 1601
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1602 1602
 
1603
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1603
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1604 1604
     }
1605 1605
 
1606 1606
     /**
@@ -1614,14 +1614,14 @@  discard block
 block discarded – undo
1614 1614
     protected function getSQLTableAlias($tableName, $assocName = '')
1615 1615
     {
1616 1616
         if ($tableName) {
1617
-            $tableName .= '#' . $assocName;
1617
+            $tableName .= '#'.$assocName;
1618 1618
         }
1619 1619
 
1620 1620
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1621 1621
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1622 1622
         }
1623 1623
 
1624
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1624
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1625 1625
 
1626 1626
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1627 1627
 
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
         }
1648 1648
 
1649 1649
         $lock  = $this->getLockTablesSql($lockMode);
1650
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1650
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1651 1651
         $sql   = 'SELECT 1 '
1652 1652
              . $lock
1653 1653
              . $where
@@ -1670,7 +1670,7 @@  discard block
 block discarded – undo
1670 1670
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1671 1671
 
1672 1672
         return $this->platform->appendLockHint(
1673
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1673
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1674 1674
             $lockMode
1675 1675
         );
1676 1676
     }
@@ -1720,19 +1720,19 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
             if ($comparison !== null) {
1722 1722
                 // special case null value handling
1723
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) {
1724
-                    $selectedColumns[] = $column . ' IS NULL';
1723
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) {
1724
+                    $selectedColumns[] = $column.' IS NULL';
1725 1725
 
1726 1726
                     continue;
1727 1727
                 }
1728 1728
 
1729 1729
                 if ($comparison === Comparison::NEQ && $value === null) {
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
             }
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1781 1781
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1782 1782
 
1783
-            return [$tableAlias . '.' . $columnName];
1783
+            return [$tableAlias.'.'.$columnName];
1784 1784
         }
1785 1785
 
1786 1786
         if ($property instanceof AssociationMetadata) {
@@ -1789,7 +1789,7 @@  discard block
 block discarded – undo
1789 1789
 
1790 1790
             // Many-To-Many requires join table check for joinColumn
1791 1791
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1792
-                if (! $owningAssociation->isOwningSide()) {
1792
+                if ( ! $owningAssociation->isOwningSide()) {
1793 1793
                     $owningAssociation = $association;
1794 1794
                 }
1795 1795
 
@@ -1803,14 +1803,14 @@  discard block
 block discarded – undo
1803 1803
                 foreach ($joinColumns as $joinColumn) {
1804 1804
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1805 1805
 
1806
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1806
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1807 1807
                 }
1808 1808
             } else {
1809
-                if (! $owningAssociation->isOwningSide()) {
1809
+                if ( ! $owningAssociation->isOwningSide()) {
1810 1810
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field);
1811 1811
                 }
1812 1812
 
1813
-                $class      = $this->class->isInheritedProperty($field)
1813
+                $class = $this->class->isInheritedProperty($field)
1814 1814
                     ? $owningAssociation->getDeclaringClass()
1815 1815
                     : $this->class
1816 1816
                 ;
@@ -1819,7 +1819,7 @@  discard block
 block discarded – undo
1819 1819
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1820 1820
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1821 1821
 
1822
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1822
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1823 1823
                 }
1824 1824
             }
1825 1825
 
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
                 $value = $value[$targetClass->identifier[0]];
1929 1929
             }
1930 1930
 
1931
-            $criteria[$tableAlias . '.' . $quotedColumnName] = $value;
1931
+            $criteria[$tableAlias.'.'.$quotedColumnName] = $value;
1932 1932
             $parameters[]                                    = [
1933 1933
                 'value' => $value,
1934 1934
                 'field' => $fieldName,
@@ -2013,7 +2013,7 @@  discard block
 block discarded – undo
2013 2013
             case ($property instanceof AssociationMetadata):
2014 2014
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2015 2015
 
2016
-                if (! $property->isOwningSide()) {
2016
+                if ( ! $property->isOwningSide()) {
2017 2017
                     $property = $class->getProperty($property->getMappedBy());
2018 2018
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2019 2019
                 }
@@ -2027,7 +2027,7 @@  discard block
 block discarded – undo
2027 2027
                     /** @var JoinColumnMetadata $joinColumn */
2028 2028
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2029 2029
 
2030
-                    if (! $joinColumn->getType()) {
2030
+                    if ( ! $joinColumn->getType()) {
2031 2031
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2032 2032
                     }
2033 2033
 
@@ -2042,7 +2042,7 @@  discard block
 block discarded – undo
2042 2042
         }
2043 2043
 
2044 2044
         if (is_array($value)) {
2045
-            return array_map(function ($type) {
2045
+            return array_map(function($type) {
2046 2046
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2047 2047
             }, $types);
2048 2048
         }
@@ -2069,7 +2069,7 @@  discard block
 block discarded – undo
2069 2069
             return [$newValue];
2070 2070
         }
2071 2071
 
2072
-        $unitOfWork      = $this->em->getUnitOfWork();
2072
+        $unitOfWork = $this->em->getUnitOfWork();
2073 2073
 
2074 2074
         if (is_object($value) && $this->mappings->has($value)) {
2075 2075
             $class     = $this->mappings->get($value);
@@ -2098,7 +2098,7 @@  discard block
 block discarded – undo
2098 2098
      */
2099 2099
     private function getIndividualValue($value)
2100 2100
     {
2101
-        if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2101
+        if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2102 2102
             return $value;
2103 2103
         }
2104 2104
 
@@ -2112,7 +2112,7 @@  discard block
 block discarded – undo
2112 2112
     {
2113 2113
         $criteria = $this->getIdentifier($entity);
2114 2114
 
2115
-        if (! $criteria) {
2115
+        if ( ! $criteria) {
2116 2116
             return false;
2117 2117
         }
2118 2118
 
@@ -2120,12 +2120,12 @@  discard block
 block discarded – undo
2120 2120
 
2121 2121
         $sql = 'SELECT 1 '
2122 2122
              . $this->getLockTablesSql(null)
2123
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2123
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2124 2124
 
2125 2125
         list($params, $types) = $this->expandParameters($criteria);
2126 2126
 
2127 2127
         if ($extraConditions !== null) {
2128
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2128
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2129 2129
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2130 2130
 
2131 2131
             $params = array_merge($params, $criteriaParams);
@@ -2135,7 +2135,7 @@  discard block
 block discarded – undo
2135 2135
         $filterSql = $this->generateFilterConditionSQL($this->class, $alias);
2136 2136
 
2137 2137
         if ($filterSql) {
2138
-            $sql .= ' AND ' . $filterSql;
2138
+            $sql .= ' AND '.$filterSql;
2139 2139
         }
2140 2140
 
2141 2141
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2148,13 +2148,13 @@  discard block
 block discarded – undo
2148 2148
      */
2149 2149
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2150 2150
     {
2151
-        if (! $association->isOwningSide()) {
2151
+        if ( ! $association->isOwningSide()) {
2152 2152
             return 'LEFT JOIN';
2153 2153
         }
2154 2154
 
2155 2155
         // if one of the join columns is nullable, return left join
2156 2156
         foreach ($association->getJoinColumns() as $joinColumn) {
2157
-            if (! $joinColumn->isNullable()) {
2157
+            if ( ! $joinColumn->isNullable()) {
2158 2158
                 continue;
2159 2159
             }
2160 2160
 
@@ -2171,7 +2171,7 @@  discard block
 block discarded – undo
2171 2171
      */
2172 2172
     public function getSQLColumnAlias()
2173 2173
     {
2174
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2174
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2175 2175
     }
2176 2176
 
2177 2177
     /**
@@ -2190,13 +2190,13 @@  discard block
 block discarded – undo
2190 2190
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
2191 2191
 
2192 2192
             if ($filterExpr !== '') {
2193
-                $filterClauses[] = '(' . $filterExpr . ')';
2193
+                $filterClauses[] = '('.$filterExpr.')';
2194 2194
             }
2195 2195
         }
2196 2196
 
2197 2197
         $sql = implode(' AND ', $filterClauses);
2198 2198
 
2199
-        return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2199
+        return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2200 2200
     }
2201 2201
 
2202 2202
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MetadataCollection.php 1 patch
Spacing   +4 added lines, -4 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\Mapping;
6 6
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     private function __construct(array $metadata)
19 19
     {
20 20
         $metadataByClassName = array_combine(
21
-            array_map(function (ClassMetadata $metadata) { return $metadata->getClassName(); }, $metadata),
21
+            array_map(function(ClassMetadata $metadata) { return $metadata->getClassName(); }, $metadata),
22 22
             $metadata
23 23
         );
24 24
         $this->metadata = $metadataByClassName;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     public function get(string $name) : ClassMetadata
28 28
     {
29 29
         $name = StaticClassNameConverter::getRealClass($name);
30
-        if(!isset($this->metadata[$name])){
31
-            throw new \Exception('No metadata found for ' . $name);
30
+        if ( ! isset($this->metadata[$name])) {
31
+            throw new \Exception('No metadata found for '.$name);
32 32
         }
33 33
         return $this->metadata[$name];
34 34
     }
Please login to merge, or discard this patch.