@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use Doctrine\Tests\Models\CMS\CmsUser; |
| 14 | 14 | use Doctrine\Tests\OrmFunctionalTestCase; |
| 15 | 15 | |
| 16 | -require_once __DIR__ . '/../../TestInit.php'; |
|
| 16 | +require_once __DIR__.'/../../TestInit.php'; |
|
| 17 | 17 | |
| 18 | 18 | class CustomFunctionsTest extends OrmFunctionalTestCase |
| 19 | 19 | { |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | $this->secondLevelCacheLogger->clearStats(); |
| 805 | 805 | $this->em->clear(); |
| 806 | 806 | |
| 807 | - $getHash = function(AbstractQuery $query){ |
|
| 807 | + $getHash = function(AbstractQuery $query) { |
|
| 808 | 808 | $method = new \ReflectionMethod($query, 'getHash'); |
| 809 | 809 | $method->setAccessible(true); |
| 810 | 810 | |
@@ -837,7 +837,7 @@ discard block |
||
| 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(); |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | private function registerType(string $className) |
| 38 | 38 | { |
| 39 | - $type = constant($className . '::NAME'); |
|
| 39 | + $type = constant($className.'::NAME'); |
|
| 40 | 40 | |
| 41 | 41 | if (DBALType::hasType($type)) { |
| 42 | 42 | DBALType::overrideType($type, $className); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | foreach ($classes as $class) { |
| 73 | 73 | $ce = $validator->validateClass($class); |
| 74 | 74 | |
| 75 | - self::assertEmpty($ce, "Invalid Modelset: " . $modelSet . " class " . $class->getClassName() . ": ". implode("\n", $ce)); |
|
| 75 | + self::assertEmpty($ce, "Invalid Modelset: ".$modelSet." class ".$class->getClassName().": ".implode("\n", $ce)); |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Hydration; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Hydration; |
| 6 | 6 | |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | $rms = $this->rsm; |
| 86 | 86 | |
| 87 | - $this->rsm->addEntityResult(CmsUser::class,'u'); |
|
| 88 | - $this->rsm->addJoinedEntityResult(CmsPhonenumber::class,'p','u','phonenumbers'); |
|
| 87 | + $this->rsm->addEntityResult(CmsUser::class, 'u'); |
|
| 88 | + $this->rsm->addJoinedEntityResult(CmsPhonenumber::class, 'p', 'u', 'phonenumbers'); |
|
| 89 | 89 | $this->rsm->addFieldResult('u', 'id', 'id'); |
| 90 | 90 | $this->rsm->addFieldResult('u', 'name', 'name'); |
| 91 | 91 | $this->rsm->setDiscriminatorColumn('name', 'name'); |
@@ -278,8 +278,8 @@ discard block |
||
| 278 | 278 | { |
| 279 | 279 | $this->rsm->addEntityResult(LegacyUser::class, 'u'); |
| 280 | 280 | $this->rsm->addJoinedEntityResult(LegacyUserReference::class, 'lu', 'u', '_references'); |
| 281 | - $this->rsm->addMetaResult('lu', '_source', '_source', true, Type::getType('integer')); |
|
| 282 | - $this->rsm->addMetaResult('lu', '_target', '_target', true, Type::getType('integer')); |
|
| 281 | + $this->rsm->addMetaResult('lu', '_source', '_source', true, Type::getType('integer')); |
|
| 282 | + $this->rsm->addMetaResult('lu', '_target', '_target', true, Type::getType('integer')); |
|
| 283 | 283 | $this->rsm->addIndexBy('lu', '_source'); |
| 284 | 284 | |
| 285 | 285 | self::assertTrue($this->rsm->hasIndexBy('lu')); |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | $rsm->setDiscriminatorColumn('p', 'discr'); |
| 34 | 34 | |
| 35 | 35 | $resultSet = [ |
| 36 | - [ |
|
| 37 | - 'u__id' => '1', |
|
| 38 | - 'u__name' => 'Fabio B. Silva' |
|
| 39 | - ], |
|
| 36 | + [ |
|
| 37 | + 'u__id' => '1', |
|
| 38 | + 'u__name' => 'Fabio B. Silva' |
|
| 39 | + ], |
|
| 40 | 40 | ]; |
| 41 | 41 | |
| 42 | 42 | $stmt = new HydratorMockStatement($resultSet); |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | $rsm->setDiscriminatorColumn('p', 'discr'); |
| 90 | 90 | |
| 91 | 91 | $resultSet = [ |
| 92 | - [ |
|
| 93 | - 'p__id' => '1', |
|
| 94 | - 'p__name' => 'Fabio B. Silva', |
|
| 95 | - 'discr' => 'subworker' |
|
| 96 | - ], |
|
| 92 | + [ |
|
| 93 | + 'p__id' => '1', |
|
| 94 | + 'p__name' => 'Fabio B. Silva', |
|
| 95 | + 'discr' => 'subworker' |
|
| 96 | + ], |
|
| 97 | 97 | ]; |
| 98 | 98 | |
| 99 | 99 | $stmt = new HydratorMockStatement($resultSet); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Hydration; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Tools; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Tools\Console; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Tools\Console\Command; |
| 6 | 6 | |
@@ -60,13 +60,13 @@ discard block |
||
| 60 | 60 | $em = $this->createMock(EntityManagerInterface::class); |
| 61 | 61 | |
| 62 | 62 | $mappingDriver->method('getAllClassNames') |
| 63 | - ->willReturn([]); |
|
| 63 | + ->willReturn([]); |
|
| 64 | 64 | |
| 65 | 65 | $configuration->method('getMetadataDriverImpl') |
| 66 | - ->willReturn($mappingDriver); |
|
| 66 | + ->willReturn($mappingDriver); |
|
| 67 | 67 | |
| 68 | 68 | $em->method('getConfiguration') |
| 69 | - ->willReturn($configuration); |
|
| 69 | + ->willReturn($configuration); |
|
| 70 | 70 | |
| 71 | 71 | $application = new Application(); |
| 72 | 72 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |
@@ -95,17 +95,17 @@ discard block |
||
| 95 | 95 | $em = $this->createMock(EntityManagerInterface::class); |
| 96 | 96 | |
| 97 | 97 | $mappingDriver->method('getAllClassNames') |
| 98 | - ->willReturn(['InvalidEntity']); |
|
| 98 | + ->willReturn(['InvalidEntity']); |
|
| 99 | 99 | |
| 100 | 100 | $configuration->method('getMetadataDriverImpl') |
| 101 | - ->willReturn($mappingDriver); |
|
| 101 | + ->willReturn($mappingDriver); |
|
| 102 | 102 | |
| 103 | 103 | $em->method('getConfiguration') |
| 104 | - ->willReturn($configuration); |
|
| 104 | + ->willReturn($configuration); |
|
| 105 | 105 | |
| 106 | 106 | $em->method('getClassMetadata') |
| 107 | - ->with('InvalidEntity') |
|
| 108 | - ->willThrowException(new MappingException('exception message')); |
|
| 107 | + ->with('InvalidEntity') |
|
| 108 | + ->willThrowException(new MappingException('exception message')); |
|
| 109 | 109 | |
| 110 | 110 | $application = new Application(); |
| 111 | 111 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |