Completed
Push — develop ( cebe30...fee52d )
by Marco
14s
created
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php 1 patch
Spacing   +17 added lines, -17 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
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         $this->em->clear();
53 53
 
54
-        $result2  = $this->em->createQuery($dql)
54
+        $result2 = $this->em->createQuery($dql)
55 55
             ->setCacheable(true)
56 56
             ->getResult();
57 57
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
         $this->em->clear();
256 256
 
257
-        $result2  = $this->em->createQuery($dql)
257
+        $result2 = $this->em->createQuery($dql)
258 258
             ->setCacheable(true)
259 259
             ->getResult();
260 260
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
         $this->em->clear();
348 348
 
349
-        $result2  = $this->em->createQuery($dql)
349
+        $result2 = $this->em->createQuery($dql)
350 350
             ->setCacheable(true)
351 351
             ->getResult();
352 352
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 
395 395
         $this->em->clear();
396 396
 
397
-        $result2  = $this->em->createQuery($dql)->setCacheable(true)
397
+        $result2 = $this->em->createQuery($dql)->setCacheable(true)
398 398
                 ->setParameter('name', $name)
399 399
                 ->getResult();
400 400
 
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         $result1    = $this->em->createQuery($dql)->setCacheable(true)->getResult();
423 423
 
424 424
         self::assertCount(2, $result1);
425
-        self::assertEquals($queryCount + 1 , $this->getCurrentQueryCount());
425
+        self::assertEquals($queryCount + 1, $this->getCurrentQueryCount());
426 426
         self::assertEquals($this->countries[0]->getId(), $result1[0]->getId());
427 427
         self::assertEquals($this->countries[1]->getId(), $result1[1]->getId());
428 428
         self::assertEquals($this->countries[0]->getName(), $result1[0]->getName());
@@ -438,11 +438,11 @@  discard block
 block discarded – undo
438 438
 
439 439
         $this->em->clear();
440 440
 
441
-        $result2  = $this->em->createQuery($dql)
441
+        $result2 = $this->em->createQuery($dql)
442 442
             ->setCacheable(true)
443 443
             ->getResult();
444 444
 
445
-        self::assertEquals($queryCount + 2 , $this->getCurrentQueryCount());
445
+        self::assertEquals($queryCount + 2, $this->getCurrentQueryCount());
446 446
         self::assertCount(2, $result2);
447 447
 
448 448
         self::assertEquals(5, $this->secondLevelCacheLogger->getPutCount());
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         self::assertEquals($result1[0]->getName(), $result2[0]->getName());
460 460
         self::assertEquals($result1[1]->getName(), $result2[1]->getName());
461 461
 
462
-        self::assertEquals($queryCount + 2 , $this->getCurrentQueryCount());
462
+        self::assertEquals($queryCount + 2, $this->getCurrentQueryCount());
463 463
     }
464 464
 
465 465
     public function testBasicQueryFetchJoinsOneToMany()
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 
501 501
         $this->em->clear();
502 502
 
503
-        $result2  = $this->em->createQuery($dql)
503
+        $result2 = $this->em->createQuery($dql)
504 504
                 ->setCacheable(true)
505 505
                 ->getResult();
506 506
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
         $this->em->clear();
567 567
         $this->secondLevelCacheLogger->clearStats();
568 568
 
569
-        $result2  = $this->em->createQuery($dql)
569
+        $result2 = $this->em->createQuery($dql)
570 570
                 ->setCacheable(true)
571 571
                 ->getResult();
572 572
 
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
 
627 627
         $this->cache->evictEntityRegion(State::class);
628 628
 
629
-        $result2  = $this->em->createQuery($dql)
629
+        $result2 = $this->em->createQuery($dql)
630 630
                 ->setCacheable(true)
631 631
                 ->getResult();
632 632
 
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
 
670 670
         $this->cache->evictEntityRegion(City::class);
671 671
 
672
-        $result2  = $this->em->createQuery($dql)
672
+        $result2 = $this->em->createQuery($dql)
673 673
                 ->setCacheable(true)
674 674
                 ->getResult();
675 675
 
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 
721 721
         $this->em->clear();
722 722
 
723
-        $result2  = $this->em->createNativeQuery($sql, $rsm)
723
+        $result2 = $this->em->createNativeQuery($sql, $rsm)
724 724
             ->setCacheable(true)
725 725
             ->getResult();
726 726
 
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 
776 776
         $this->em->clear();
777 777
 
778
-        $result2  = $this->em->createQuery($dql)
778
+        $result2 = $this->em->createQuery($dql)
779 779
             ->setCacheable(true)
780 780
             ->setFirstResult(2)
781 781
             ->setMaxResults(1)
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 
788 788
         $this->em->clear();
789 789
 
790
-        $result3  = $this->em->createQuery($dql)
790
+        $result3 = $this->em->createQuery($dql)
791 791
             ->setCacheable(true)
792 792
             ->getResult();
793 793
 
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
             ->getRegion()
838 838
             ->put($key, $entry);
839 839
 
840
-        $result2  = $this->em->createQuery($dql)
840
+        $result2 = $this->em->createQuery($dql)
841 841
             ->setCacheable(true)
842 842
             ->setLifetime(3600)
843 843
             ->getResult();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -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.
tests/Doctrine/Tests/ORM/Functional/SequenceGeneratorTest.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
 
@@ -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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     public function testExceptionIsThrownWhenCallingFindByWithoutParameter()
312 312
     {
313 313
         $this->em->getRepository(CmsUser::class)
314
-                  ->findByStatus();
314
+                    ->findByStatus();
315 315
     }
316 316
 
317 317
     /**
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
     public function testExceptionIsThrownWhenUsingInvalidFieldName()
321 321
     {
322 322
         $this->em->getRepository(CmsUser::class)
323
-                  ->findByThisFieldDoesNotExist('testvalue');
323
+                    ->findByThisFieldDoesNotExist('testvalue');
324 324
     }
325 325
 
326 326
     /**
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $this->expectException(TransactionRequiredException::class);
333 333
 
334 334
         $this->em->getRepository(CmsUser::class)
335
-                  ->find(1, LockMode::PESSIMISTIC_READ);
335
+                    ->find(1, LockMode::PESSIMISTIC_READ);
336 336
     }
337 337
 
338 338
     /**
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
         $this->expectException(TransactionRequiredException::class);
345 345
 
346 346
         $this->em->getRepository(CmsUser::class)
347
-                  ->find(1, LockMode::PESSIMISTIC_WRITE);
347
+                    ->find(1, LockMode::PESSIMISTIC_WRITE);
348 348
     }
349 349
 
350 350
     /**
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
         $this->expectException(OptimisticLockException::class);
357 357
 
358 358
         $this->em->getRepository(CmsUser::class)
359
-                  ->find(1, LockMode::OPTIMISTIC);
359
+                    ->find(1, LockMode::OPTIMISTIC);
360 360
     }
361 361
 
362 362
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.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\SchemaTool;
6 6
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         parent::setUp();
17 17
         if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') {
18
-            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mysql.');
18
+            $this->markTestSkipped('The '.__CLASS__.' requires the use of mysql.');
19 19
         }
20 20
     }
21 21
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.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\SchemaTool;
6 6
 
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
         $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform());
87 87
         $sql = array_filter($sql, function($sql) { return strpos($sql, 'DROP') === false; });
88 88
 
89
-        self::assertCount(0, $sql, "SQL: " . implode(PHP_EOL, $sql));
89
+        self::assertCount(0, $sql, "SQL: ".implode(PHP_EOL, $sql));
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.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\Locking;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         while ($worker->work()) {
30 30
             if ($worker->returnCode() != GEARMAN_SUCCESS) {
31
-                echo "return_code: " . $worker->returnCode() . "\n";
31
+                echo "return_code: ".$worker->returnCode()."\n";
32 32
                 break;
33 33
             }
34 34
         }
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 
80 80
     protected function processWorkload($job)
81 81
     {
82
-        echo "Received job: " . $job->handle() . " for function " . $job->functionName() . "\n";
82
+        echo "Received job: ".$job->handle()." for function ".$job->functionName()."\n";
83 83
 
84 84
         $workload = $job->workload();
85 85
         $workload = unserialize($workload);
86 86
 
87
-        if (!isset($workload['conn']) || !is_array($workload['conn'])) {
87
+        if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) {
88 88
             throw new \InvalidArgumentException("Missing Database parameters");
89 89
         }
90 90
 
91 91
         $this->em = $this->createEntityManager($workload['conn']);
92 92
 
93
-        if (!isset($workload['fixture'])) {
93
+        if ( ! isset($workload['fixture'])) {
94 94
             throw new \InvalidArgumentException("Missing Fixture parameters");
95 95
         }
96 96
         return $workload['fixture'];
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
     protected function createEntityManager($conn)
100 100
     {
101 101
         $config = new Configuration();
102
-        $config->setProxyDir(__DIR__ . '/../../../Proxies');
102
+        $config->setProxyDir(__DIR__.'/../../../Proxies');
103 103
         $config->setProxyNamespace('MyProject\Proxies');
104 104
         $config->setAutoGenerateProxyClasses(true);
105 105
 
106
-        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']);
106
+        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']);
107 107
         $config->setMetadataDriverImpl($annotDriver);
108 108
 
109 109
         $cache = new ArrayCache();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheTest.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
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         self::assertInstanceOf(State::class, $state);
253 253
         self::assertEquals($stateName, $state->getName());
254 254
 
255
-        $state->setName($stateName . uniqid());
255
+        $state->setName($stateName.uniqid());
256 256
 
257 257
         $this->em->persist($state);
258 258
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PaginationTest.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\Tests\ORM\Functional;
6 6
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $iter = $paginator->getIterator();
132 132
         self::assertCount(9, $iter);
133 133
         $result = iterator_to_array($iter);
134
-        self::assertEquals($checkField . "0", $result[0]->$checkField);
134
+        self::assertEquals($checkField."0", $result[0]->$checkField);
135 135
     }
136 136
 
137 137
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $iter = $paginator->getIterator();
148 148
         self::assertCount(3, $iter);
149 149
         $result = iterator_to_array($iter);
150
-        self::assertEquals($checkField . "0", $result[0]->$checkField);
150
+        self::assertEquals($checkField."0", $result[0]->$checkField);
151 151
     }
152 152
 
153 153
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $iter = $paginator->getIterator();
164 164
         self::assertCount(3, $iter);
165 165
         $result = iterator_to_array($iter);
166
-        self::assertEquals($checkField . "3", $result[0]->$checkField);
166
+        self::assertEquals($checkField."3", $result[0]->$checkField);
167 167
     }
168 168
 
169 169
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $iter = $paginator->getIterator();
177 177
         self::assertCount(9, $iter);
178 178
         $result = iterator_to_array($iter);
179
-        self::assertEquals($checkField . "8", $result[0]->$checkField);
179
+        self::assertEquals($checkField."8", $result[0]->$checkField);
180 180
     }
181 181
 
182 182
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $iter = $paginator->getIterator();
192 192
         self::assertCount(3, $iter);
193 193
         $result = iterator_to_array($iter);
194
-        self::assertEquals($checkField . "8", $result[0]->$checkField);
194
+        self::assertEquals($checkField."8", $result[0]->$checkField);
195 195
     }
196 196
 
197 197
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $iter = $paginator->getIterator();
207 207
         self::assertCount(3, $iter);
208 208
         $result = iterator_to_array($iter);
209
-        self::assertEquals($checkField . "5", $result[0]->$checkField);
209
+        self::assertEquals($checkField."5", $result[0]->$checkField);
210 210
     }
211 211
 
212 212
     /**
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBoth($useOutputWalkers)
480 480
     {
481 481
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
482
-        $dqlAsc = $dql . " ASC, d.name";
483
-        $dqlDesc = $dql . " DESC, d.name";
482
+        $dqlAsc = $dql." ASC, d.name";
483
+        $dqlDesc = $dql." DESC, d.name";
484 484
         $this->iterateWithOrderAsc($useOutputWalkers, true, $dqlAsc, "name");
485 485
         $this->iterateWithOrderDesc($useOutputWalkers, true, $dqlDesc, "name");
486 486
     }
@@ -488,8 +488,8 @@  discard block
 block discarded – undo
488 488
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBothWithLimitWithOutputWalker()
489 489
     {
490 490
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
491
-        $dqlAsc = $dql . " ASC, d.name";
492
-        $dqlDesc = $dql . " DESC, d.name";
491
+        $dqlAsc = $dql." ASC, d.name";
492
+        $dqlDesc = $dql." DESC, d.name";
493 493
         $this->iterateWithOrderAscWithLimit(true, true, $dqlAsc, "name");
494 494
         $this->iterateWithOrderDescWithLimit(true, true, $dqlDesc, "name");
495 495
     }
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
         $this->expectExceptionMessage('Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers.');
501 501
 
502 502
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
503
-        $dqlAsc = $dql . " ASC, d.name";
504
-        $dqlDesc = $dql . " DESC, d.name";
503
+        $dqlAsc = $dql." ASC, d.name";
504
+        $dqlDesc = $dql." DESC, d.name";
505 505
         $this->iterateWithOrderAscWithLimit(false, true, $dqlAsc, "name");
506 506
         $this->iterateWithOrderDescWithLimit(false, true, $dqlDesc, "name");
507 507
     }
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         $users = iterator_to_array($paginator->getIterator());
586 586
         self::assertCount(9, $users);
587 587
         foreach ($users as $i => $user) {
588
-            self::assertEquals("username" . (8 - $i), $user->username);
588
+            self::assertEquals("username".(8 - $i), $user->username);
589 589
         }
590 590
     }
591 591
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             $company->logo->image_width = 100 + $i;
736 736
             $company->logo->image_height = 100 + $i;
737 737
             $company->logo->company = $company;
738
-            for ($j=0;$j<3;$j++) {
738
+            for ($j = 0; $j < 3; $j++) {
739 739
                 $department = new Department();
740 740
                 $department->name = "name$i$j";
741 741
                 $department->company = $company;
Please login to merge, or discard this patch.