Completed
Pull Request — develop (#6743)
by Grégoire
65:46
created
tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -224,13 +224,13 @@
 block discarded – undo
224 224
 
225 225
         $q = $this->em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm);
226 226
         $q2 = $q->setSQL('foo')
227
-          ->setResultSetMapping($rsm)
228
-          ->expireResultCache(true)
229
-          ->setHint('foo', 'bar')
230
-          ->setParameter(1, 'foo')
231
-          ->setParameters($parameters)
232
-          ->setResultCacheDriver(null)
233
-          ->setResultCacheLifetime(3500);
227
+            ->setResultSetMapping($rsm)
228
+            ->expireResultCache(true)
229
+            ->setHint('foo', 'bar')
230
+            ->setParameter(1, 'foo')
231
+            ->setParameters($parameters)
232
+            ->setResultCacheDriver(null)
233
+            ->setResultCacheLifetime(3500);
234 234
 
235 235
         self::assertSame($q, $q2);
236 236
     }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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
 
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
 
437 437
         self::assertCount(1, $result);
438 438
         self::assertInstanceOf(CmsAddress::class, $result[0]);
439
-        self::assertEquals($addr->id,  $result[0]->id);
440
-        self::assertEquals($addr->city,  $result[0]->city);
439
+        self::assertEquals($addr->id, $result[0]->id);
440
+        self::assertEquals($addr->city, $result[0]->city);
441 441
         self::assertEquals($addr->country, $result[0]->country);
442 442
     }
443 443
 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
         $email = new CmsEmail();
456 456
 
457
-        $email->email   = '[email protected]';
457
+        $email->email = '[email protected]';
458 458
 
459 459
         $user->setEmail($email);
460 460
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
         $repository = $this->em->getRepository(CmsUser::class);
606 606
         $result     = $repository
607 607
             ->createNativeNamedQuery('fetchUserPhonenumberCount')
608
-            ->setParameter(1, ['test','FabioBatSilva'])->getResult();
608
+            ->setParameter(1, ['test', 'FabioBatSilva'])->getResult();
609 609
 
610 610
         self::assertEquals(2, count($result));
611 611
         self::assertTrue(is_array($result[0]));
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 
833 833
         $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u');
834 834
 
835
-        self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string)$rsm);
835
+        self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string) $rsm);
836 836
     }
837 837
 
838 838
     /**
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.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
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         try {
79 79
             // exception depending on the underlying Database Driver
80 80
             $this->em->flush();
81
-        } catch(\Exception $e) {
81
+        } catch (\Exception $e) {
82 82
             $exceptionThrown = true;
83 83
         }
84 84
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
         self::assertEquals(2, count($user->phonenumbers));
364 364
         $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1";
365 365
         $user = $this->em->createQuery($dql)
366
-                          ->setParameter(1, $user->id)
367
-                          ->setHint(Query::HINT_REFRESH, true)
368
-                          ->getSingleResult();
366
+                            ->setParameter(1, $user->id)
367
+                            ->setHint(Query::HINT_REFRESH, true)
368
+                            ->getSingleResult();
369 369
 
370 370
         self::assertEquals(1, count($user->phonenumbers));
371 371
     }
@@ -400,8 +400,8 @@  discard block
 block discarded – undo
400 400
 
401 401
         $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1";
402 402
         $user = $this->em->createQuery($dql)
403
-                          ->setParameter(1, $userId)
404
-                          ->getSingleResult();
403
+                            ->setParameter(1, $userId)
404
+                            ->getSingleResult();
405 405
 
406 406
         self::assertEquals(1, count($user->phonenumbers));
407 407
     }
Please login to merge, or discard this 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/SingleTableInheritanceTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -333,19 +333,19 @@  discard block
 block discarded – undo
333 333
 
334 334
         $repos = $this->em->getRepository(CompanyContract::class);
335 335
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
336
-        self::assertEquals(3, count($contracts), "There should be 3 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyContract'");
336
+        self::assertEquals(3, count($contracts), "There should be 3 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyContract'");
337 337
 
338 338
         $repos = $this->em->getRepository(CompanyFixContract::class);
339 339
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
340
-        self::assertEquals(1, count($contracts), "There should be 1 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
340
+        self::assertEquals(1, count($contracts), "There should be 1 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
341 341
 
342 342
         $repos = $this->em->getRepository(CompanyFlexContract::class);
343 343
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
344
-        self::assertEquals(2, count($contracts), "There should be 2 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
344
+        self::assertEquals(2, count($contracts), "There should be 2 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
345 345
 
346 346
         $repos = $this->em->getRepository(CompanyFlexUltraContract::class);
347 347
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
348
-        self::assertEquals(1, count($contracts), "There should be 1 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
348
+        self::assertEquals(1, count($contracts), "There should be 1 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
349 349
     }
350 350
 
351 351
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.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
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
                 $this->em->getClassMetadata(DDC381Entity::class),
19 19
                 ]
20 20
             );
21
-        } catch(\Exception $e) {
21
+        } catch (\Exception $e) {
22 22
 
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3042Test.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
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             $this
32 32
                 ->em
33 33
                 ->createQuery(
34
-                    'SELECT f, b FROM ' . __NAMESPACE__ . '\DDC3042Foo f JOIN ' . __NAMESPACE__ . '\DDC3042Bar b WITH 1 = 1'
34
+                    'SELECT f, b FROM '.__NAMESPACE__.'\DDC3042Foo f JOIN '.__NAMESPACE__.'\DDC3042Bar b WITH 1 = 1'
35 35
                 )
36 36
                 ->getSQL()
37 37
         );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2759Test.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
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                 $this->em->getClassMetadata(DDC2759MetadataCategory::class),
28 28
                 ]
29 29
             );
30
-        } catch(\Exception $e) {
30
+        } catch (\Exception $e) {
31 31
             return;
32 32
         }
33 33
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1695Test.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
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function testIssue()
24 24
     {
25
-        $dql = "SELECT n.smallText, n.publishDate FROM " . __NAMESPACE__ . "\\DDC1695News n";
25
+        $dql = "SELECT n.smallText, n.publishDate FROM ".__NAMESPACE__."\\DDC1695News n";
26 26
         $sql = $this->em->createQuery($dql)->getSQL();
27 27
 
28 28
         self::assertEquals(
Please login to merge, or discard this patch.