Failed Conditions
Pull Request — master (#7143)
by Mike
07:13
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/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($name)
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.
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.
lib/Doctrine/ORM/EntityManager.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;
6 6
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         $this->conn            = $conn;
141 141
         $this->config          = $config;
142 142
         $this->eventManager    = $eventManager;
143
-        $this->mappings       = $metadataCollection;
143
+        $this->mappings = $metadataCollection;
144 144
 
145 145
         $this->repositoryFactory   = $config->getRepositoryFactory();
146 146
         $this->unitOfWork          = new UnitOfWork($this);
@@ -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.
tests/Doctrine/Tests/OrmTestCase.php 1 patch
Spacing   +61 added lines, -61 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'),
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'),
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'),
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'),
139
-                realpath(__DIR__ . '/Models/DDC2372'),
140
-                realpath(__DIR__ . '/Models/DDC3579'),
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'),
148
-                realpath(__DIR__ . '/Models/CustomType'),
149
-                realpath(__DIR__ . '/Models/DDC2504'),
150
-                realpath(__DIR__ . '/Models/DDC3597'),
151
-                realpath(__DIR__ . '/Models/DDC6412'),
152
-                realpath(__DIR__ . '/Models/ECommerce'),
153
-                realpath(__DIR__ . '/Models/Hydration'),
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'),
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
+                realpath(__DIR__.'/Models/ValueConversionType'),
118
+                realpath(__DIR__.'/Models/CMS'),
119
+                realpath(__DIR__.'/Models/DDC1590'),
120
+                realpath(__DIR__.'/Models/DDC3293'),
121
+                realpath(__DIR__.'/Models/DDC3899'),
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'),
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'),
139
+                realpath(__DIR__.'/Models/DDC2372'),
140
+                realpath(__DIR__.'/Models/DDC3579'),
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'),
148
+                realpath(__DIR__.'/Models/CustomType'),
149
+                realpath(__DIR__.'/Models/DDC2504'),
150
+                realpath(__DIR__.'/Models/DDC3597'),
151
+                realpath(__DIR__.'/Models/DDC6412'),
152
+                realpath(__DIR__.'/Models/ECommerce'),
153
+                realpath(__DIR__.'/Models/Hydration'),
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'),
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.
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Spacing   +77 added lines, -77 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,64 +744,64 @@  discard block
 block discarded – undo
744 744
 
745 745
         $config->setMetadataDriverImpl(
746 746
             $mappingDriver ?? $config->newDefaultAnnotationDriver([
747
-                realpath(__DIR__ . '/Models/Cache'),
748
-                realpath(__DIR__ . '/Models/DDC1476'),
749
-                realpath(__DIR__ . '/Models/DDC3231'),
750
-                realpath(__DIR__ . '/Models/DDC3711'),
751
-                realpath(__DIR__ . '/Models/DDC869'),
752
-                realpath(__DIR__ . '/Models/FriendObject'),
753
-                realpath(__DIR__ . '/Models/Issue5989'),
754
-                realpath(__DIR__ . '/Models/NonPublicSchemaJoins'),
755
-                realpath(__DIR__ . '/Models/Quote'),
756
-                realpath(__DIR__ . '/Models/ValueConversionType'),
757
-                realpath(__DIR__ . '/Models/CMS'),
758
-                realpath(__DIR__ . '/Models/DDC1590'),
759
-                realpath(__DIR__ . '/Models/DDC3293'),
760
-                realpath(__DIR__ . '/Models/DDC3899'),
761
-                realpath(__DIR__ . '/Models/DDC889'),
762
-                realpath(__DIR__ . '/Models/Generic'),
763
-                realpath(__DIR__ . '/Models/JoinedInheritanceType'),
764
-                realpath(__DIR__ . '/Models/NullDefault'),
765
-                realpath(__DIR__ . '/Models/Reflection'),
766
-                realpath(__DIR__ . '/Models/ValueObjects'),
767
-                realpath(__DIR__ . '/Models/Company'),
768
-                realpath(__DIR__ . '/Models/DDC1872'),
769
-                realpath(__DIR__ . '/Models/DDC3346'),
770
-                realpath(__DIR__ . '/Models/DDC4006'),
771
-                realpath(__DIR__ . '/Models/DDC964'),
772
-                realpath(__DIR__ . '/Models/GeoNames'),
773
-                realpath(__DIR__ . '/Models/Legacy'),
774
-                realpath(__DIR__ . '/Models/OneToOneInverseSideLoad'),
775
-                realpath(__DIR__ . '/Models/Routing'),
776
-                realpath(__DIR__ . '/Models/VersionedManyToOne'),
777
-                realpath(__DIR__ . '/Models/CompositeKeyInheritance'),
778
-                realpath(__DIR__ . '/Models/DDC2372'),
779
-                realpath(__DIR__ . '/Models/DDC3579'),
780
-                realpath(__DIR__ . '/Models/DDC5934'),
781
-                realpath(__DIR__ . '/Models/DirectoryTree'),
782
-                realpath(__DIR__ . '/Models/Global'),
783
-                realpath(__DIR__ . '/Models/ManyToManyPersister'),
784
-                realpath(__DIR__ . '/Models/OneToOneSingleTableInheritance'),
785
-                realpath(__DIR__ . '/Models/StockExchange'),
786
-                realpath(__DIR__ . '/Models/VersionedOneToOne'),
787
-                realpath(__DIR__ . '/Models/CustomType'),
788
-                realpath(__DIR__ . '/Models/DDC2504'),
789
-                realpath(__DIR__ . '/Models/DDC3597'),
790
-                realpath(__DIR__ . '/Models/DDC6412'),
791
-                realpath(__DIR__ . '/Models/ECommerce'),
792
-                realpath(__DIR__ . '/Models/Hydration'),
793
-                realpath(__DIR__ . '/Models/MixedToOneIdentity'),
794
-                realpath(__DIR__ . '/Models/Pagination'),
795
-                realpath(__DIR__ . '/Models/Taxi'),
796
-                realpath(__DIR__ . '/Models/DDC117'),
797
-                realpath(__DIR__ . '/Models/DDC2825'),
798
-                realpath(__DIR__ . '/Models/DDC3699'),
799
-                realpath(__DIR__ . '/Models/DDC753'),
800
-                realpath(__DIR__ . '/Models/Forum'),
801
-                realpath(__DIR__ . '/Models/IdentityIsAssociation'),
802
-                realpath(__DIR__ . '/Models/Navigation'),
803
-                realpath(__DIR__ . '/Models/ProxySpecifics'),
804
-                realpath(__DIR__ . '/Models/Tweet'),
747
+                realpath(__DIR__.'/Models/Cache'),
748
+                realpath(__DIR__.'/Models/DDC1476'),
749
+                realpath(__DIR__.'/Models/DDC3231'),
750
+                realpath(__DIR__.'/Models/DDC3711'),
751
+                realpath(__DIR__.'/Models/DDC869'),
752
+                realpath(__DIR__.'/Models/FriendObject'),
753
+                realpath(__DIR__.'/Models/Issue5989'),
754
+                realpath(__DIR__.'/Models/NonPublicSchemaJoins'),
755
+                realpath(__DIR__.'/Models/Quote'),
756
+                realpath(__DIR__.'/Models/ValueConversionType'),
757
+                realpath(__DIR__.'/Models/CMS'),
758
+                realpath(__DIR__.'/Models/DDC1590'),
759
+                realpath(__DIR__.'/Models/DDC3293'),
760
+                realpath(__DIR__.'/Models/DDC3899'),
761
+                realpath(__DIR__.'/Models/DDC889'),
762
+                realpath(__DIR__.'/Models/Generic'),
763
+                realpath(__DIR__.'/Models/JoinedInheritanceType'),
764
+                realpath(__DIR__.'/Models/NullDefault'),
765
+                realpath(__DIR__.'/Models/Reflection'),
766
+                realpath(__DIR__.'/Models/ValueObjects'),
767
+                realpath(__DIR__.'/Models/Company'),
768
+                realpath(__DIR__.'/Models/DDC1872'),
769
+                realpath(__DIR__.'/Models/DDC3346'),
770
+                realpath(__DIR__.'/Models/DDC4006'),
771
+                realpath(__DIR__.'/Models/DDC964'),
772
+                realpath(__DIR__.'/Models/GeoNames'),
773
+                realpath(__DIR__.'/Models/Legacy'),
774
+                realpath(__DIR__.'/Models/OneToOneInverseSideLoad'),
775
+                realpath(__DIR__.'/Models/Routing'),
776
+                realpath(__DIR__.'/Models/VersionedManyToOne'),
777
+                realpath(__DIR__.'/Models/CompositeKeyInheritance'),
778
+                realpath(__DIR__.'/Models/DDC2372'),
779
+                realpath(__DIR__.'/Models/DDC3579'),
780
+                realpath(__DIR__.'/Models/DDC5934'),
781
+                realpath(__DIR__.'/Models/DirectoryTree'),
782
+                realpath(__DIR__.'/Models/Global'),
783
+                realpath(__DIR__.'/Models/ManyToManyPersister'),
784
+                realpath(__DIR__.'/Models/OneToOneSingleTableInheritance'),
785
+                realpath(__DIR__.'/Models/StockExchange'),
786
+                realpath(__DIR__.'/Models/VersionedOneToOne'),
787
+                realpath(__DIR__.'/Models/CustomType'),
788
+                realpath(__DIR__.'/Models/DDC2504'),
789
+                realpath(__DIR__.'/Models/DDC3597'),
790
+                realpath(__DIR__.'/Models/DDC6412'),
791
+                realpath(__DIR__.'/Models/ECommerce'),
792
+                realpath(__DIR__.'/Models/Hydration'),
793
+                realpath(__DIR__.'/Models/MixedToOneIdentity'),
794
+                realpath(__DIR__.'/Models/Pagination'),
795
+                realpath(__DIR__.'/Models/Taxi'),
796
+                realpath(__DIR__.'/Models/DDC117'),
797
+                realpath(__DIR__.'/Models/DDC2825'),
798
+                realpath(__DIR__.'/Models/DDC3699'),
799
+                realpath(__DIR__.'/Models/DDC753'),
800
+                realpath(__DIR__.'/Models/Forum'),
801
+                realpath(__DIR__.'/Models/IdentityIsAssociation'),
802
+                realpath(__DIR__.'/Models/Navigation'),
803
+                realpath(__DIR__.'/Models/ProxySpecifics'),
804
+                realpath(__DIR__.'/Models/Tweet'),
805 805
             ])
806 806
         );
807 807
 
@@ -851,13 +851,13 @@  discard block
 block discarded – undo
851 851
 
852 852
             foreach ($last25queries as $i => $query) {
853 853
                 $params = array_map(
854
-                    function ($p) {
854
+                    function($p) {
855 855
                         return is_object($p) ? get_class($p) : var_export($p, true);
856 856
                     },
857 857
                     $query['params'] ?: []
858 858
                 );
859 859
 
860
-                $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL;
860
+                $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL;
861 861
             }
862 862
 
863 863
             $trace    = $e->getTrace();
@@ -870,11 +870,11 @@  discard block
 block discarded – undo
870 870
                         break;
871 871
                     }
872 872
 
873
-                    $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL;
873
+                    $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL;
874 874
                 }
875 875
             }
876 876
 
877
-            $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg;
877
+            $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg;
878 878
 
879 879
             throw new \Exception($message, (int) $e->getCode(), $e);
880 880
         }
Please login to merge, or discard this patch.