Failed Conditions
Pull Request — develop (#6719)
by Marco
61:19
created
tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php 1 patch
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.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.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\Functional\Ticket;
6 6
 
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
         $this->em->flush();
50 50
         $this->em->clear();
51 51
 
52
-        $dql = "SELECT a, b, ba FROM " . __NAMESPACE__ . "\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba";
52
+        $dql = "SELECT a, b, ba FROM ".__NAMESPACE__."\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba";
53 53
         $results = $this->em->createQuery($dql)->setMaxResults(1)->getResult();
54 54
 
55 55
         self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom);
56
-        self::assertFalse( $results[0]->entitiesB[0]->entityATo instanceof GhostObjectInterface);
56
+        self::assertFalse($results[0]->entitiesB[0]->entityATo instanceof GhostObjectInterface);
57 57
         self::assertInstanceOf(Collection::class, $results[0]->entitiesB[0]->entityATo->getEntitiesB());
58 58
     }
59 59
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.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\Functional\Ticket;
6 6
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
                 $this->em->getClassMetadata(DDC633Appointment::class),
20 20
                 ]
21 21
             );
22
-        } catch(\Exception $e) {
22
+        } catch (\Exception $e) {
23 23
 
24 24
         }
25 25
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->em->flush();
67 67
         $this->em->clear();
68 68
 
69
-        $appointments = $this->em->createQuery("SELECT a FROM " . __NAMESPACE__ . "\DDC633Appointment a")->getResult();
69
+        $appointments = $this->em->createQuery("SELECT a FROM ".__NAMESPACE__."\DDC633Appointment a")->getResult();
70 70
 
71 71
         foreach ($appointments AS $eagerAppointment) {
72 72
             self::assertInstanceOf(GhostObjectInterface::class, $eagerAppointment->patient);
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/Functional/Ticket/DDC881Test.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\Functional\Ticket;
6 6
 
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
         $this->em->clear();
84 84
 
85 85
         // fetch-join that foreign-key/primary-key entity association
86
-        $dql = "SELECT c, p FROM " . DDC881PhoneCall::class . " c JOIN c.phonenumber p";
86
+        $dql = "SELECT c, p FROM ".DDC881PhoneCall::class." c JOIN c.phonenumber p";
87 87
         $calls = $this->em->createQuery($dql)->getResult();
88 88
 
89 89
         self::assertEquals(2, count($calls));
90 90
         self::assertNotInstanceOf(GhostObjectInterface::class, $calls[0]->getPhoneNumber());
91 91
         self::assertNotInstanceOf(GhostObjectInterface::class, $calls[1]->getPhoneNumber());
92 92
 
93
-        $dql = "SELECT p, c FROM " . DDC881PhoneNumber::class . " p JOIN p.calls c";
93
+        $dql = "SELECT p, c FROM ".DDC881PhoneNumber::class." p JOIN p.calls c";
94 94
         $numbers = $this->em->createQuery($dql)->getResult();
95 95
 
96 96
         self::assertEquals(2, count($numbers));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1690Test.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
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public $listeners = [];
82 82
 
83 83
     public function addPropertyChangedListener(PropertyChangedListener $listener) {
84
-        if (! \in_array($listener, $this->listeners, true)) {
84
+        if ( ! \in_array($listener, $this->listeners, true)) {
85 85
             $this->listeners[] = $listener;
86 86
         }
87 87
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.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\Proxy;
6 6
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                     self::isInstanceOf(CompanyEmployee::class)
216 216
                 )
217 217
             )
218
-            ->willReturnCallback(function (array $id, CompanyEmployee $companyEmployee) {
218
+            ->willReturnCallback(function(array $id, CompanyEmployee $companyEmployee) {
219 219
                 $companyEmployee->setSalary(1000); // A property on the CompanyEmployee
220 220
                 $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson
221 221
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\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.
lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools;
6 6
 
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
         fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n");
78 78
 
79 79
         foreach ($identityMap as $className => $map) {
80
-            fwrite($fh, "Class: ". $className . "\n");
80
+            fwrite($fh, "Class: ".$className."\n");
81 81
 
82 82
             foreach ($map as $entity) {
83
-                fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n");
83
+                fwrite($fh, " Entity: ".$this->getIdString($entity, $uow)." ".spl_object_hash($entity)."\n");
84 84
                 fwrite($fh, "  Associations:\n");
85 85
 
86 86
                 $cm = $em->getClassMetadata($className);
87 87
 
88 88
                 foreach ($cm->getDeclaredPropertiesIterator() as $field => $association) {
89
-                    if (! ($association instanceof AssociationMetadata)) {
89
+                    if ( ! ($association instanceof AssociationMetadata)) {
90 90
                         continue;
91 91
                     }
92 92
 
93
-                    fwrite($fh, "   " . $field . " ");
93
+                    fwrite($fh, "   ".$field." ");
94 94
 
95 95
                     $value = $association->getValue($entity);
96 96
 
@@ -101,25 +101,25 @@  discard block
 block discarded – undo
101 101
                     }
102 102
 
103 103
                     if ($association instanceof ToOneAssociationMetadata) {
104
-                        if ($value instanceof GhostObjectInterface && !$value->isProxyInitialized()) {
104
+                        if ($value instanceof GhostObjectInterface && ! $value->isProxyInitialized()) {
105 105
                             fwrite($fh, "[PROXY] ");
106 106
                         }
107 107
 
108
-                        fwrite($fh, $this->getIdString($value, $uow) . " " . spl_object_hash($value) . "\n");
108
+                        fwrite($fh, $this->getIdString($value, $uow)." ".spl_object_hash($value)."\n");
109 109
                     } else {
110
-                        $initialized = !($value instanceof PersistentCollection) || $value->isInitialized();
110
+                        $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized();
111 111
 
112 112
                         if ($initialized) {
113
-                            fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n");
113
+                            fwrite($fh, "[INITIALIZED] ".$this->getType($value)." ".count($value)." elements\n");
114 114
 
115 115
                             foreach ($value as $obj) {
116
-                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
116
+                                fwrite($fh, "    ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n");
117 117
                             }
118 118
                         } else {
119
-                            fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n");
119
+                            fwrite($fh, "[PROXY] ".$this->getType($value)." unknown element size\n");
120 120
 
121 121
                             foreach ($value->unwrap() as $obj) {
122
-                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
122
+                                fwrite($fh, "    ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n");
123 123
                             }
124 124
                         }
125 125
                     }
Please login to merge, or discard this patch.