Test Failed
Pull Request — develop (#6743)
by Grégoire
63:08
created
tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.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;
6 6
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public $address;
115 115
 
116
-    public function getId() {return $this->id;}
116
+    public function getId() {return $this->id; }
117 117
 }
118 118
 
119 119
 /**
@@ -155,5 +155,5 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public $user;
157 157
 
158
-    public function getUser() {return $this->user;}
158
+    public function getUser() {return $this->user; }
159 159
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.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;
6 6
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         self::assertEquals('FOO', $this->em->getConnection()->fetchColumn("select named_lower_case_string from customtype_uppercases where id=".$entity->id.""), 'Database holds uppercase string');
73 73
 
74 74
 
75
-        $entity->namedLowerCaseString   = 'bar';
75
+        $entity->namedLowerCaseString = 'bar';
76 76
 
77 77
         $this->em->persist($entity);
78 78
         $this->em->flush();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         $this->em->clear();
132 132
 
133
-        $query = $this->em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = " . $parentId);
133
+        $query = $this->em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = ".$parentId);
134 134
 
135 135
         $result = $query->getResult();
136 136
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/EntityListenersTest.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\Tests\ORM\Functional;
6 6
 
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
         $fix = new CompanyFixContract();
38 38
         $fix->setFixPrice(2000);
39 39
 
40
-        $this->listener->preFlushCalls  = [];
40
+        $this->listener->preFlushCalls = [];
41 41
 
42 42
         $this->em->persist($fix);
43 43
         $this->em->flush();
44 44
 
45
-        self::assertCount(1,$this->listener->preFlushCalls);
45
+        self::assertCount(1, $this->listener->preFlushCalls);
46 46
         self::assertSame($fix, $this->listener->preFlushCalls[0][0]);
47 47
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->preFlushCalls[0][0]);
48 48
         self::assertInstanceOf(PreFlushEventArgs::class, $this->listener->preFlushCalls[0][1]);
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
         $this->em->flush();
58 58
         $this->em->clear();
59 59
 
60
-        $this->listener->postLoadCalls  = [];
60
+        $this->listener->postLoadCalls = [];
61 61
 
62 62
         $dql = "SELECT f FROM Doctrine\Tests\Models\Company\CompanyFixContract f WHERE f.id = ?1";
63 63
         $fix = $this->em->createQuery($dql)->setParameter(1, $fix->getId())->getSingleResult();
64 64
 
65
-        self::assertCount(1,$this->listener->postLoadCalls);
65
+        self::assertCount(1, $this->listener->postLoadCalls);
66 66
         self::assertSame($fix, $this->listener->postLoadCalls[0][0]);
67 67
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->postLoadCalls[0][0]);
68 68
         self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postLoadCalls[0][1]);
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
         $fix = new CompanyFixContract();
74 74
         $fix->setFixPrice(2000);
75 75
 
76
-        $this->listener->prePersistCalls  = [];
76
+        $this->listener->prePersistCalls = [];
77 77
 
78 78
         $this->em->persist($fix);
79 79
         $this->em->flush();
80 80
 
81
-        self::assertCount(1,$this->listener->prePersistCalls);
81
+        self::assertCount(1, $this->listener->prePersistCalls);
82 82
         self::assertSame($fix, $this->listener->prePersistCalls[0][0]);
83 83
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->prePersistCalls[0][0]);
84 84
         self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->prePersistCalls[0][1]);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $this->em->persist($fix);
95 95
         $this->em->flush();
96 96
 
97
-        self::assertCount(1,$this->listener->postPersistCalls);
97
+        self::assertCount(1, $this->listener->postPersistCalls);
98 98
         self::assertSame($fix, $this->listener->postPersistCalls[0][0]);
99 99
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->postPersistCalls[0][0]);
100 100
         self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postPersistCalls[0][1]);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $this->em->persist($fix);
116 116
         $this->em->flush();
117 117
 
118
-        self::assertCount(1,$this->listener->preUpdateCalls);
118
+        self::assertCount(1, $this->listener->preUpdateCalls);
119 119
         self::assertSame($fix, $this->listener->preUpdateCalls[0][0]);
120 120
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->preUpdateCalls[0][0]);
121 121
         self::assertInstanceOf(PreUpdateEventArgs::class, $this->listener->preUpdateCalls[0][1]);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $this->em->persist($fix);
137 137
         $this->em->flush();
138 138
 
139
-        self::assertCount(1,$this->listener->postUpdateCalls);
139
+        self::assertCount(1, $this->listener->postUpdateCalls);
140 140
         self::assertSame($fix, $this->listener->postUpdateCalls[0][0]);
141 141
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->postUpdateCalls[0][0]);
142 142
         self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postUpdateCalls[0][1]);
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $this->em->remove($fix);
156 156
         $this->em->flush();
157 157
 
158
-        self::assertCount(1,$this->listener->preRemoveCalls);
158
+        self::assertCount(1, $this->listener->preRemoveCalls);
159 159
         self::assertSame($fix, $this->listener->preRemoveCalls[0][0]);
160 160
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->preRemoveCalls[0][0]);
161 161
         self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->preRemoveCalls[0][1]);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $this->em->remove($fix);
175 175
         $this->em->flush();
176 176
 
177
-        self::assertCount(1,$this->listener->postRemoveCalls);
177
+        self::assertCount(1, $this->listener->postRemoveCalls);
178 178
         self::assertSame($fix, $this->listener->postRemoveCalls[0][0]);
179 179
         self::assertInstanceOf(CompanyFixContract::class, $this->listener->postRemoveCalls[0][0]);
180 180
         self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postRemoveCalls[0][1]);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function testMultiLevelUpdateAndFind()
105 105
     {
106
-    	$manager = new CompanyManager;
106
+        $manager = new CompanyManager;
107 107
         $manager->setName('Roman S. Borschel');
108 108
         $manager->setSalary(100000);
109 109
         $manager->setDepartment('IT');
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
     public function testSelfReferencingOneToOne()
153 153
     {
154
-    	$manager = new CompanyManager;
154
+        $manager = new CompanyManager;
155 155
         $manager->setName('John Smith');
156 156
         $manager->setSalary(100000);
157 157
         $manager->setDepartment('IT');
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     public function testBulkUpdateIssueDDC368()
301 301
     {
302 302
         $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
303
-                  ->execute();
303
+                    ->execute();
304 304
 
305 305
         $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
306 306
                             ->getResult();
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
     public function testBulkUpdateNonScalarParameterDDC1341()
315 315
     {
316 316
         $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
317
-                  ->setParameter(0, new \DateTime())
318
-                  ->setParameter(1, 'IT')
319
-                  ->execute();
317
+                    ->setParameter(0, new \DateTime())
318
+                    ->setParameter(1, 'IT')
319
+                    ->execute();
320 320
 
321 321
         self::addToAssertionCount(1);
322 322
     }
Please login to merge, or discard this 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
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $this->em->clear();
51 51
 
52
-        $query = $this->em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc');
52
+        $query = $this->em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc');
53 53
 
54 54
         $entities = $query->getResult();
55 55
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $this->em->clear();
66 66
 
67
-        $query = $this->em->createQuery('select p from ' . CompanyEmployee::class . ' p');
67
+        $query = $this->em->createQuery('select p from '.CompanyEmployee::class.' p');
68 68
 
69 69
         $entities = $query->getResult();
70 70
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $this->em->clear();
85 85
 
86
-        $query = $this->em->createQuery("update " . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
86
+        $query = $this->em->createQuery("update ".CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
87 87
 
88 88
         $query->setParameter(1, 'NewName', 'string');
89 89
         $query->setParameter(2, 'NewDepartment');
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
         self::assertEquals(1, $numUpdated);
96 96
 
97
-        $query = $this->em->createQuery('delete from ' . CompanyPerson::class . ' p');
97
+        $query = $this->em->createQuery('delete from '.CompanyPerson::class.' p');
98 98
 
99 99
         $numDeleted = $query->execute();
100 100
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $this->em->flush();
170 170
         $this->em->clear();
171 171
 
172
-        $query = $this->em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\'');
172
+        $query = $this->em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\'');
173 173
 
174 174
         $result = $query->getResult();
175 175
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
         $this->em->clear();
203 203
 
204
-        $query = $this->em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1');
204
+        $query = $this->em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1');
205 205
 
206 206
         $query->setParameter(1, 'Roman');
207 207
 
@@ -267,18 +267,18 @@  discard block
 block discarded – undo
267 267
         $this->em->flush();
268 268
         $this->em->clear();
269 269
 
270
-        $q = $this->em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1');
270
+        $q = $this->em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1');
271 271
 
272 272
         $q->setParameter(1, $event1->getId());
273 273
 
274 274
         $result = $q->getResult();
275 275
 
276 276
         self::assertCount(1, $result);
277
-        self::assertInstanceOf(CompanyAuction::class, $result[0], sprintf("Is of class %s",get_class($result[0])));
277
+        self::assertInstanceOf(CompanyAuction::class, $result[0], sprintf("Is of class %s", get_class($result[0])));
278 278
 
279 279
         $this->em->clear();
280 280
 
281
-        $q = $this->em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1');
281
+        $q = $this->em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1');
282 282
 
283 283
         $q->setParameter(1, $org->getId());
284 284
 
@@ -299,10 +299,10 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function testBulkUpdateIssueDDC368()
301 301
     {
302
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
302
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1')
303 303
                   ->execute();
304 304
 
305
-        $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
305
+        $result = $this->em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1')
306 306
                             ->getResult();
307 307
 
308 308
         self::assertGreaterThan(0, $result);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      */
314 314
     public function testBulkUpdateNonScalarParameterDDC1341()
315 315
     {
316
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
316
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1')
317 317
                   ->setParameter(0, new \DateTime())
318 318
                   ->setParameter(1, 'IT')
319 319
                   ->execute();
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         $this->em->flush();
372 372
         $this->em->clear();
373 373
 
374
-        $dqlManager = $this->em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1')
374
+        $dqlManager = $this->em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1')
375 375
                                 ->setParameter(1, $person->getId())
376 376
                                 ->getSingleResult();
377 377
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SequenceGeneratorTest.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;
6 6
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         parent::setUp();
20 20
 
21
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsSequences()) {
21
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsSequences()) {
22 22
             $this->markTestSkipped('Only working for Databases that support sequences.');
23 23
         }
24 24
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                     $this->em->getClassMetadata(SequenceEntity::class),
29 29
                 ]
30 30
             );
31
-        } catch(\Exception $e) {
31
+        } catch (\Exception $e) {
32 32
         }
33 33
     }
34 34
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.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;
6 6
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $this->createFixture();
186 186
 
187
-        $product  = $this->em->find(ECommerceProduct::class, $this->product->getId());
187
+        $product = $this->em->find(ECommerceProduct::class, $this->product->getId());
188 188
 
189 189
         $thirdFeature = new ECommerceFeature();
190 190
         $thirdFeature->setDescription('Model writing tutorial');
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CascadeRemoveOrderTest.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;
6 6
 
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
      */
156 156
     private $ownerO;
157 157
 
158
-    public function __construct(CascadeRemoveOrderEntityO $eO, $position=1)
158
+    public function __construct(CascadeRemoveOrderEntityO $eO, $position = 1)
159 159
     {
160 160
         $this->position = $position;
161
-        $this->ownerO= $eO;
161
+        $this->ownerO = $eO;
162 162
         $this->ownerO->addOneToManyG($this);
163 163
     }
164 164
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToManyTest.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;
6 6
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
         $l1 = new Login('session1');
398 398
         $l2 = new Login('session2');
399
-        $token  = new Token('token-hash');
399
+        $token = new Token('token-hash');
400 400
         $token->addLogin($l1);
401 401
         $token->addLogin($l2);
402 402
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php 2 patches
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\Tests\ORM\Functional;
6 6
 
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
         $user->username = 'gblanco';
294 294
         $user->status = 'developer';
295 295
 
296
-        for ($i=0; $i < $groupCount; ++$i) {
296
+        for ($i = 0; $i < $groupCount; ++$i) {
297 297
             $group = new CmsGroup;
298
-            $group->name = 'Developers_' . $i;
298
+            $group->name = 'Developers_'.$i;
299 299
             $user->addGroup($group);
300 300
         }
301 301
 
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
             $user
419 419
                 ->getGroups()
420 420
                 ->matching($criteria)
421
-                ->map(function (CmsGroup $group) {
421
+                ->map(function(CmsGroup $group) {
422 422
                     return $group->getName();
423 423
                 })
424 424
                 ->toArray()
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
             $user
463 463
                 ->getTags()
464 464
                 ->matching($criteria)
465
-                ->map(function (CmsTag $tag) {
465
+                ->map(function(CmsTag $tag) {
466 466
                     return $tag->getName();
467 467
                 })
468 468
                 ->toArray()
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -268,8 +268,8 @@
 block discarded – undo
268 268
         $this->em->clear();
269 269
 
270 270
         $newUser = $this->em->createQuery('SELECT u, g FROM Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.groups g WHERE u.id = ?1')
271
-                             ->setParameter(1, $user->getId())
272
-                             ->getSingleResult();
271
+                                ->setParameter(1, $user->getId())
272
+                                ->getSingleResult();
273 273
         self::assertCount(0, $newUser->groups);
274 274
         self::assertInstanceOf(ManyToManyAssociationMetadata::class, $newUser->groups->getMapping());
275 275
 
Please login to merge, or discard this patch.