Test Failed
Pull Request — develop (#6719)
by Marco
63:23
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/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
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         parent::setUp();
43 43
 
44 44
         $namespace = 'Doctrine\Tests\Proxies';
45
-        $directory = __DIR__ . '/../../Proxies';
45
+        $directory = __DIR__.'/../../Proxies';
46 46
 
47 47
         $this->resolver = new DefaultProxyResolver($namespace, $directory);
48 48
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $id = $this->createProduct();
98 98
 
99
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
99
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
100 100
         $class = $this->em->getClassMetadata(get_class($entity));
101 101
 
102 102
         self::assertEquals(ECommerceProduct::class, $class->getClassName());
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
     {
110 110
         $id = $this->createProduct();
111 111
 
112
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
113
-        $entity2 = $this->em->find(ECommerceProduct::class , $id);
112
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
113
+        $entity2 = $this->em->find(ECommerceProduct::class, $id);
114 114
 
115 115
         self::assertSame($entity, $entity2);
116 116
         self::assertEquals('Doctrine Cookbook', $entity2->getName());
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $id = $this->createProduct();
125 125
 
126 126
         /* @var $entity ECommerceProduct */
127
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
127
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
128 128
 
129 129
         /* @var $clone ECommerceProduct */
130 130
         $clone = clone $entity;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $id = $this->createProduct();
152 152
 
153 153
         /* @var $entity ECommerceProduct|GhostObjectInterface */
154
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
154
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
155 155
 
156 156
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
157 157
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $id = $this->createProduct();
169 169
 
170 170
         /* @var $entity ECommerceProduct|GhostObjectInterface */
171
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
171
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
172 172
 
173 173
         $entity->setName('Doctrine 2 Cookbook');
174 174
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $this->em->clear();
177 177
 
178 178
         /* @var $entity ECommerceProduct|GhostObjectInterface */
179
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
179
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
180 180
 
181 181
         self::assertEquals('Doctrine 2 Cookbook', $entity->getName());
182 182
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $id = $this->createProduct();
187 187
 
188 188
         /* @var $entity ECommerceProduct|GhostObjectInterface */
189
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
189
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
190 190
 
191 191
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
192 192
         self::assertEquals($id, $entity->getId());
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $id = $this->createAuction();
202 202
 
203 203
         /* @var $entity CompanyAuction|GhostObjectInterface */
204
-        $entity = $this->em->getReference(CompanyAuction::class , $id);
204
+        $entity = $this->em->getReference(CompanyAuction::class, $id);
205 205
 
206 206
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
207 207
         self::assertEquals($id, $entity->getId());
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         $id = $this->createProduct();
240 240
 
241 241
         /* @var $entity ECommerceProduct|GhostObjectInterface */
242
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
242
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
243 243
 
244 244
         self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
245 245
         self::assertEquals('Doctrine Cookbook', $entity->getName());
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         $id = $this->createProduct();
255 255
 
256 256
         /* @var $entity ECommerceProduct|GhostObjectInterface */
257
-        $entity = $this->em->getReference(ECommerceProduct::class , $id);
257
+        $entity = $this->em->getReference(ECommerceProduct::class, $id);
258 258
 
259 259
         $className = ClassUtils::getClass($entity);
260 260
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         self::assertFalse($entity->isProxyInitialized());
263 263
         self::assertEquals(ECommerceProduct::class, $className);
264 264
 
265
-        $proxyFileName = $this->resolver->resolveProxyClassPath(ECommerceProduct::class );
265
+        $proxyFileName = $this->resolver->resolveProxyClassPath(ECommerceProduct::class);
266 266
 
267 267
         self::assertTrue(file_exists($proxyFileName), "Proxy file name cannot be found generically.");
268 268
 
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.