Failed Conditions
Push — develop ( 9800ca...d1cf9a )
by Marco
272:19 queued 264:21
created
tests/Doctrine/Tests/ORM/UnitOfWorkTest.php 1 patch
Spacing   +3 added lines, -3 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;
6 6
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
             'empty string, single field'     => [$emptyString, ''],
451 451
             'non-empty string, single field' => [$nonEmptyString, $nonEmptyString->id],
452 452
             'empty strings, two fields'      => [$emptyStrings, ' '],
453
-            'non-empty strings, two fields'  => [$nonEmptyStrings, $nonEmptyStrings->id1 . ' ' . $nonEmptyStrings->id2],
453
+            'non-empty strings, two fields'  => [$nonEmptyStrings, $nonEmptyStrings->id1.' '.$nonEmptyStrings->id2],
454 454
             'boolean true'                   => [$booleanTrue, '1'],
455 455
             'boolean false'                  => [$booleanFalse, ''],
456 456
         ];
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 
482 482
     public function entitiesWithInvalidIdentifiersProvider()
483 483
     {
484
-        $firstNullString  = new EntityWithCompositeStringIdentifier();
484
+        $firstNullString = new EntityWithCompositeStringIdentifier();
485 485
 
486 486
         $firstNullString->id2 = uniqid('id2', true);
487 487
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +24 added lines, -24 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
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required.";
275 275
 
276 276
         if ( ! empty($hint)) {
277
-            $message .= ' (Hint: ' . $hint . ')';
277
+            $message .= ' (Hint: '.$hint.')';
278 278
         }
279 279
 
280 280
         return new self($message);
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     public static function reflectionFailure($entity, \ReflectionException $previousException)
306 306
     {
307
-        return new self('An error occurred in ' . $entity, 0, $previousException);
307
+        return new self('An error occurred in '.$entity, 0, $previousException);
308 308
     }
309 309
 
310 310
     /**
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
      */
316 316
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
317 317
     {
318
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
319
-            . $className . ' since it is referenced by a join column of another class.');
318
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
319
+            . $className.' since it is referenced by a join column of another class.');
320 320
     }
321 321
 
322 322
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public static function noIdDefined($entity)
417 417
     {
418
-        return new self('No ID defined for entity ' . $entity);
418
+        return new self('No ID defined for entity '.$entity);
419 419
     }
420 420
 
421 421
     /**
@@ -436,12 +436,12 @@  discard block
 block discarded – undo
436 436
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
437 437
     {
438 438
         if ( ! empty($path)) {
439
-            $path = '[' . $path . ']';
439
+            $path = '['.$path.']';
440 440
         }
441 441
 
442 442
         return new self(
443
-            'File mapping drivers must have a valid directory path, ' .
444
-            'however the given path ' . $path . ' seems to be incorrect!'
443
+            'File mapping drivers must have a valid directory path, '.
444
+            'however the given path '.$path.' seems to be incorrect!'
445 445
         );
446 446
     }
447 447
 
@@ -472,11 +472,11 @@  discard block
 block discarded – undo
472 472
     public static function duplicateDiscriminatorEntry($className, array $entries, array $map)
473 473
     {
474 474
         return new self(
475
-            "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " .
476
-            "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " .
477
-            "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map(
475
+            "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ".
476
+            "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ".
477
+            "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map(
478 478
                 function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map)
479
-            )) . "})"
479
+            ))."})"
480 480
         );
481 481
     }
482 482
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property)
541 541
     {
542 542
         return new self(sprintf(
543
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
543
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
544 544
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
545 545
             $property->getName(),
546 546
             $property->getTypeName(),
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
     public static function illegalOrphanRemoval($className, $field)
641 641
     {
642 642
         return new self("Orphan removal is only allowed on one-to-one and one-to-many ".
643
-            "associations, but " . $className."#" .$field . " is not.");
643
+            "associations, but ".$className."#".$field." is not.");
644 644
     }
645 645
 
646 646
     /**
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
      */
673 673
     public static function noInheritanceOnMappedSuperClass($className)
674 674
     {
675
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
675
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
676 676
     }
677 677
 
678 678
     /**
@@ -684,8 +684,8 @@  discard block
 block discarded – undo
684 684
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
685 685
     {
686 686
         return new self(
687
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
688
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " .
687
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
688
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
689 689
             "to avoid this exception from occurring."
690 690
         );
691 691
     }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
      */
699 699
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
700 700
     {
701
-        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
701
+        return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback.");
702 702
     }
703 703
 
704 704
     /**
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
      */
745 745
     public static function invalidFetchMode($className, $annotation)
746 746
     {
747
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
747
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
748 748
     }
749 749
 
750 750
     /**
@@ -754,7 +754,7 @@  discard block
 block discarded – undo
754 754
      */
755 755
     public static function compositeKeyAssignedIdGeneratorRequired($className)
756 756
     {
757
-        return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
757
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
758 758
     }
759 759
 
760 760
     /**
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
      */
767 767
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
768 768
     {
769
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity."#".$associationName."'.");
769
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity."#".$associationName."'.");
770 770
     }
771 771
 
772 772
     /**
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
      */
779 779
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
780 780
     {
781
-        $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades));
781
+        $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades));
782 782
 
783 783
         return new self(sprintf(
784 784
             "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', and 'refresh'",
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
     {
811 811
         return new self(
812 812
             sprintf(
813
-                'Infinite nesting detected for embedded property %s::%s. ' .
813
+                'Infinite nesting detected for embedded property %s::%s. '.
814 814
                 'You cannot embed an embeddable from the same type inside an embeddable.',
815 815
                 $className,
816 816
                 $propertyName
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php 2 patches
Spacing   +7 added lines, -7 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\Functional;
6 6
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $user->username = 'gblanco';
184 184
         $user->status = 'developer';
185 185
 
186
-        for ($i=0; $i<3; ++$i) {
186
+        for ($i = 0; $i < 3; ++$i) {
187 187
             $phone = new CmsPhonenumber;
188 188
             $phone->phonenumber = 100 + $i;
189 189
             $user->addPhonenumber($phone);
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         $user->username = 'gblanco';
412 412
         $user->status = 'developer';
413 413
 
414
-        for ($i=0; $i<3; ++$i) {
414
+        for ($i = 0; $i < 3; ++$i) {
415 415
             $phone = new CmsPhonenumber;
416 416
             $phone->phonenumber = 100 + $i;
417 417
             $user->addPhonenumber($phone);
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
         $user->username = 'gblanco';
452 452
         $user->status = 'developer';
453 453
 
454
-        for ($i=0; $i<3; ++$i) {
454
+        for ($i = 0; $i < 3; ++$i) {
455 455
             $phone = new CmsPhonenumber;
456 456
             $phone->phonenumber = 100 + $i;
457 457
             $user->addPhonenumber($phone);
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $user->username = 'gblanco';
493 493
         $user->status = 'developer';
494 494
 
495
-        for ($i=0; $i<3; ++$i) {
495
+        for ($i = 0; $i < 3; ++$i) {
496 496
             $phone = new CmsPhonenumber;
497 497
             $phone->phonenumber = 100 + $i;
498 498
             $user->addPhonenumber($phone);
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 
876 876
         self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, "It IS a proxy, ...");
877 877
         self::assertTrue($fetchedUser->isProxyInitialized(), "...but its initialized!");
878
-        self::assertEquals($qc+2, $this->getCurrentQueryCount());
878
+        self::assertEquals($qc + 2, $this->getCurrentQueryCount());
879 879
     }
880 880
 
881 881
     /**
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
 
937 937
         $this->expectException(ORMInvalidArgumentException::class);
938 938
         $this->expectExceptionMessage(
939
-            'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' .
939
+            'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '.
940 940
             '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.'
941 941
         );
942 942
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -361,9 +361,9 @@  discard block
 block discarded – undo
361 361
         self::assertCount(2, $user->phonenumbers);
362 362
         $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1";
363 363
         $user = $this->em->createQuery($dql)
364
-                          ->setParameter(1, $user->id)
365
-                          ->setHint(Query::HINT_REFRESH, true)
366
-                          ->getSingleResult();
364
+                            ->setParameter(1, $user->id)
365
+                            ->setHint(Query::HINT_REFRESH, true)
366
+                            ->getSingleResult();
367 367
 
368 368
         self::assertCount(1, $user->phonenumbers);
369 369
     }
@@ -398,8 +398,8 @@  discard block
 block discarded – undo
398 398
 
399 399
         $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1";
400 400
         $user = $this->em->createQuery($dql)
401
-                          ->setParameter(1, $userId)
402
-                          ->getSingleResult();
401
+                            ->setParameter(1, $userId)
402
+                            ->getSingleResult();
403 403
 
404 404
         self::assertCount(1, $user->phonenumbers);
405 405
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.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\Functional\Ticket;
6 6
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         // proxy for Y is in identity map
49 49
 
50
-        $z2 = $this->em->createQuery('select z,y from ' . get_class($z) . ' z join z.y y where z.id = ?1')
50
+        $z2 = $this->em->createQuery('select z,y from '.get_class($z).' z join z.y y where z.id = ?1')
51 51
                 ->setParameter(1, $z->id)
52 52
                 ->getSingleResult();
53 53
         self::assertInstanceOf(GhostObjectInterface::class, $z2->y);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Mapping;
6 6
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php";
115 115
 
116
-        $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']);
116
+        $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']);
117 117
 
118 118
         $entityManager = $this->createEntityManager($metadataDriver);
119 119
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
         self::assertSame(
123 123
             $mf->getMetadataFor(DoctrineGlobal_Article::class),
124
-            $mf->getMetadataFor('\\' . DoctrineGlobal_Article::class)
124
+            $mf->getMetadataFor('\\'.DoctrineGlobal_Article::class)
125 125
         );
126 126
         self::assertTrue($mf->hasMetadataFor(DoctrineGlobal_Article::class));
127
-        self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobal_Article::class));
127
+        self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobal_Article::class));
128 128
     }
129 129
 
130 130
     /**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     public function testAddDefaultDiscriminatorMap()
176 176
     {
177 177
         $cmf = new ClassMetadataFactory();
178
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']);
178
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']);
179 179
         $em = $this->createEntityManager($driver);
180 180
         $cmf->setEntityManager($em);
181 181
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     {
216 216
         // DDC-3551
217 217
         $conn = $this->createMock(Connection::class);
218
-        $mockDriver    = new MetadataDriverMock();
218
+        $mockDriver = new MetadataDriverMock();
219 219
         $conn->expects($this->any())
220 220
             ->method('getEventManager')
221 221
             ->willReturn(new EventManager());
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
         $driverMock = new DriverMock();
240 240
         $config = new Configuration();
241 241
 
242
-        $config->setProxyDir(__DIR__ . '/../../Proxies');
242
+        $config->setProxyDir(__DIR__.'/../../Proxies');
243 243
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
244 244
 
245
-        if (!$conn) {
245
+        if ( ! $conn) {
246 246
             $conn = new ConnectionMock([], $driverMock, $config, new EventManager());
247 247
         }
248 248
         $eventManager = $conn->getEventManager();
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
     public function testQuoteMetadata()
334 334
     {
335 335
         $cmf    = new ClassMetadataFactory();
336
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']);
336
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']);
337 337
         $em     = $this->createEntityManager($driver);
338 338
         $cmf->setEntityManager($em);
339 339
 
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         $listener
423 423
             ->expects($this->any())
424 424
             ->method('onClassMetadataNotFound')
425
-            ->will($this->returnCallback(function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) {
425
+            ->will($this->returnCallback(function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) {
426 426
                 $test->assertNull($args->getFoundMetadata());
427 427
                 $test->assertSame('Foo', $args->getClassName());
428 428
                 $test->assertSame($em, $args->getObjectManager());
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
     public function testInheritsIdGeneratorMappingFromEmbeddable()
485 485
     {
486 486
         $cmf = new ClassMetadataFactory();
487
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']);
487
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']);
488 488
         $em = $this->createEntityManager($driver);
489 489
         $cmf->setEntityManager($em);
490 490
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
         $cmf = new ClassMetadataFactory();
136 136
         $driver = $this->createMock(MappingDriver::class);
137 137
         $driver->expects($this->at(0))
138
-               ->method('isTransient')
139
-               ->with($this->equalTo(CmsUser::class))
140
-               ->will($this->returnValue(true));
138
+                ->method('isTransient')
139
+                ->with($this->equalTo(CmsUser::class))
140
+                ->will($this->returnValue(true));
141 141
         $driver->expects($this->at(1))
142
-               ->method('isTransient')
143
-               ->with($this->equalTo(CmsArticle::class))
144
-               ->will($this->returnValue(false));
142
+                ->method('isTransient')
143
+                ->with($this->equalTo(CmsArticle::class))
144
+                ->will($this->returnValue(false));
145 145
 
146 146
         $em = $this->createEntityManager($driver);
147 147
 
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
         $cmf = new ClassMetadataFactory();
158 158
         $driver = $this->createMock(MappingDriver::class);
159 159
         $driver->expects($this->at(0))
160
-               ->method('isTransient')
161
-               ->with($this->equalTo(CmsUser::class))
162
-               ->will($this->returnValue(true));
160
+                ->method('isTransient')
161
+                ->with($this->equalTo(CmsUser::class))
162
+                ->will($this->returnValue(true));
163 163
         $driver->expects($this->at(1))
164
-               ->method('isTransient')
165
-               ->with($this->equalTo(CmsArticle::class))
166
-               ->will($this->returnValue(false));
164
+                ->method('isTransient')
165
+                ->with($this->equalTo(CmsArticle::class))
166
+                ->will($this->returnValue(false));
167 167
 
168 168
         $em = $this->createEntityManager($driver);
169 169
         $em->getConfiguration()->addEntityNamespace('CMS', 'Doctrine\Tests\Models\CMS');
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Parser.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
         $tokenStr = substr($dql, (int) $token['position'], $length);
472 472
 
473 473
         // Building informative message
474
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
474
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
475 475
 
476 476
         throw QueryException::semanticalError(
477 477
             $message,
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
             // If the namespace is not given then assumes the first FROM entity namespace
622 622
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
623 623
                 $namespace  = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
624
-                $fqcn       = $namespace . '\\' . $className;
624
+                $fqcn       = $namespace.'\\'.$className;
625 625
 
626 626
                 if (class_exists($fqcn)) {
627 627
                     $expression->className  = $fqcn;
@@ -670,13 +670,13 @@  discard block
 block discarded – undo
670 670
                 }
671 671
 
672 672
                 $this->semanticalError(
673
-                    "There is no mapped field named '$field' on class " . $class->getClassName() . ".", $deferredItem['token']
673
+                    "There is no mapped field named '$field' on class ".$class->getClassName().".", $deferredItem['token']
674 674
                 );
675 675
             }
676 676
 
677 677
             if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) {
678 678
                 $this->semanticalError(
679
-                    "The partial field selection of class " . $class->getClassName() . " must contain the identifier.",
679
+                    "The partial field selection of class ".$class->getClassName()." must contain the identifier.",
680 680
                     $deferredItem['token']
681 681
                 );
682 682
             }
@@ -745,9 +745,9 @@  discard block
 block discarded – undo
745 745
             $property = $class->getProperty($field);
746 746
 
747 747
             // Check if field or association exists
748
-            if (! $property) {
748
+            if ( ! $property) {
749 749
                 $this->semanticalError(
750
-                    'Class ' . $class->getClassName() . ' has no field or association named ' . $field,
750
+                    'Class '.$class->getClassName().' has no field or association named '.$field,
751 751
                     $deferredItem['token']
752 752
                 );
753 753
             }
@@ -786,8 +786,8 @@  discard block
 block discarded – undo
786 786
                 // Build the error message
787 787
                 $semanticalError  = 'Invalid PathExpression. ';
788 788
                 $semanticalError .= \count($expectedStringTypes) === 1
789
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
790
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
789
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
790
+                    : implode(' or ', $expectedStringTypes).' expected.';
791 791
 
792 792
                 $this->semanticalError($semanticalError, $deferredItem['token']);
793 793
             }
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 
957 957
             list($namespaceAlias, $simpleClassName) = explode(':', $this->lexer->token['value']);
958 958
 
959
-            $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
959
+            $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
960 960
         }
961 961
 
962 962
         return $schemaName;
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 
1042 1042
         if ( ! isset($this->queryComponents[$identVariable])) {
1043 1043
             $this->semanticalError(
1044
-                'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.'
1044
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1045 1045
             );
1046 1046
         }
1047 1047
 
@@ -1054,8 +1054,8 @@  discard block
 block discarded – undo
1054 1054
         $qComp = $this->queryComponents[$identVariable];
1055 1055
         $class = $qComp['metadata'];
1056 1056
 
1057
-        if (! (($property = $class->getProperty($field)) !== null && $property instanceof AssociationMetadata)) {
1058
-            $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field);
1057
+        if ( ! (($property = $class->getProperty($field)) !== null && $property instanceof AssociationMetadata)) {
1058
+            $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field);
1059 1059
         }
1060 1060
 
1061 1061
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -2477,7 +2477,7 @@  discard block
 block discarded – undo
2477 2477
         // Peek beyond the matching closing parenthesis ')'
2478 2478
         $peek = $this->peekBeyondClosingParenthesis();
2479 2479
 
2480
-        if (in_array($peek['value'], ["=",  "<", "<=", "<>", ">", ">=", "!="]) ||
2480
+        if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) ||
2481 2481
             in_array($peek['type'], [Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS]) ||
2482 2482
             $this->isMathOperator($peek)) {
2483 2483
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
@@ -2582,7 +2582,7 @@  discard block
 block discarded – undo
2582 2582
             return $this->NullComparisonExpression();
2583 2583
         }
2584 2584
 
2585
-        if ($token['type'] === Lexer::T_IS  && $lookahead['type'] === Lexer::T_EMPTY) {
2585
+        if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) {
2586 2586
             return $this->EmptyCollectionComparisonExpression();
2587 2587
         }
2588 2588
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ComponentMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping;
7 7
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php 1 patch
Spacing   +14 added lines, -14 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\Functional;
6 6
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
         $configuration = $this->em->getConfiguration();
38 38
 
39
-        $configuration->setProxyNamespace(__NAMESPACE__ . '\\ProxyTest');
40
-        $configuration->setProxyDir(__DIR__ . '/../../Proxies');
39
+        $configuration->setProxyNamespace(__NAMESPACE__.'\\ProxyTest');
40
+        $configuration->setProxyDir(__DIR__.'/../../Proxies');
41 41
         $configuration->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_ALWAYS);
42 42
 
43 43
         $this->factory = new StaticProxyFactory($this->em, $configuration->buildGhostObjectFactory());
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $id = $this->createProduct();
85 85
 
86
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
86
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
87 87
         $class = $this->em->getClassMetadata(get_class($entity));
88 88
 
89 89
         self::assertEquals(ECommerceProduct::class, $class->getClassName());
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $id = $this->createProduct();
98 98
 
99
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
100
-        $entity2 = $this->em->find(ECommerceProduct::class , $id);
99
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
100
+        $entity2 = $this->em->find(ECommerceProduct::class, $id);
101 101
 
102 102
         self::assertSame($entity, $entity2);
103 103
         self::assertEquals('Doctrine Cookbook', $entity2->getName());
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $id = $this->createProduct();
112 112
 
113 113
         /* @var $entity ECommerceProduct */
114
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
114
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
115 115
 
116 116
         /* @var $clone ECommerceProduct */
117 117
         $clone = clone $entity;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $id = $this->createProduct();
139 139
 
140 140
         /* @var $entity ECommerceProduct|GhostObjectInterface */
141
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
141
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
142 142
 
143 143
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
144 144
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $id = $this->createProduct();
156 156
 
157 157
         /* @var $entity ECommerceProduct|GhostObjectInterface */
158
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
158
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
159 159
 
160 160
         $entity->setName('Doctrine 2 Cookbook');
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $this->em->clear();
164 164
 
165 165
         /* @var $entity ECommerceProduct|GhostObjectInterface */
166
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
166
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
167 167
 
168 168
         self::assertEquals('Doctrine 2 Cookbook', $entity->getName());
169 169
     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         $id = $this->createProduct();
174 174
 
175 175
         /* @var $entity ECommerceProduct|GhostObjectInterface */
176
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
176
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
177 177
 
178 178
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
179 179
         self::assertEquals($id, $entity->getId());
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $id = $this->createAuction();
189 189
 
190 190
         /* @var $entity CompanyAuction|GhostObjectInterface */
191
-        $entity = $this->em->getReference(CompanyAuction::class , $id);
191
+        $entity = $this->em->getReference(CompanyAuction::class, $id);
192 192
 
193 193
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
194 194
         self::assertEquals($id, $entity->getId());
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         $id = $this->createProduct();
227 227
 
228 228
         /* @var $entity ECommerceProduct|GhostObjectInterface */
229
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
229
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
230 230
 
231 231
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
232 232
         self::assertEquals('Doctrine Cookbook', $entity->getName());
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $id = $this->createProduct();
242 242
 
243 243
         /* @var $entity ECommerceProduct|GhostObjectInterface */
244
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
244
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
245 245
 
246 246
         $className = StaticClassNameConverter::getClass($entity);
247 247
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Doctrine\Tests\ORM\Functional;
5 5
 
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
         $eventManager->addEventListener([Events::postLoad], $listener);
235 235
 
236 236
         $this->em->find(CmsUser::class, $this->userId);
237
-        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!');
238
-        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!');
237
+        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!');
238
+        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!');
239 239
     }
240 240
 
241 241
     private function loadFixture()
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     {
312 312
         $object = $event->getObject();
313 313
         $class = StaticClassNameConverter::getClass($object);
314
-        if (!isset($this->firedByClasses[$class])) {
314
+        if ( ! isset($this->firedByClasses[$class])) {
315 315
             $this->firedByClasses[$class] = 1;
316 316
         } else {
317 317
             $this->firedByClasses[$class]++;
Please login to merge, or discard this patch.