@@ -136,24 +136,24 @@ |
||
| 136 | 136 | ->will($this->returnValue( 10 )); |
| 137 | 137 | |
| 138 | 138 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 139 | - ->setMethods(['getSqlExecutor']) |
|
| 140 | - ->getMock(); |
|
| 139 | + ->setMethods(['getSqlExecutor']) |
|
| 140 | + ->getMock(); |
|
| 141 | 141 | $parserResultMock->expects($this->once()) |
| 142 | - ->method('getSqlExecutor') |
|
| 143 | - ->will($this->returnValue($sqlExecMock)); |
|
| 142 | + ->method('getSqlExecutor') |
|
| 143 | + ->will($this->returnValue($sqlExecMock)); |
|
| 144 | 144 | |
| 145 | 145 | $cache = $this->getMockBuilder(CacheProvider::class) |
| 146 | - ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | - ->getMock(); |
|
| 146 | + ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | + ->getMock(); |
|
| 148 | 148 | |
| 149 | 149 | $cache->expects($this->at(0))->method('doFetch')->will($this->returnValue(1)); |
| 150 | 150 | $cache->expects($this->at(1)) |
| 151 | - ->method('doFetch') |
|
| 152 | - ->with($this->isType('string')) |
|
| 153 | - ->will($this->returnValue($parserResultMock)); |
|
| 151 | + ->method('doFetch') |
|
| 152 | + ->with($this->isType('string')) |
|
| 153 | + ->will($this->returnValue($parserResultMock)); |
|
| 154 | 154 | |
| 155 | 155 | $cache->expects($this->never()) |
| 156 | - ->method('doSave'); |
|
| 156 | + ->method('doSave'); |
|
| 157 | 157 | |
| 158 | 158 | $query->setQueryCacheDriver($cache); |
| 159 | 159 | |
@@ -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 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | $sqlExecMock->expects($this->once()) |
| 137 | 137 | ->method('execute') |
| 138 | - ->will($this->returnValue( 10 )); |
|
| 138 | + ->will($this->returnValue(10)); |
|
| 139 | 139 | |
| 140 | 140 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 141 | 141 | ->setMethods(['getSqlExecutor']) |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $query->setDQL($dql); |
| 57 | 57 | |
| 58 | 58 | foreach ($hints as $key => $value) { |
| 59 | - $query->setHint($key, $value); |
|
| 59 | + $query->setHint($key, $value); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | $parser = new Query\Parser($query); |
@@ -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\Query; |
| 6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $this->addToAssertionCount(1); |
| 31 | 31 | } catch (QueryException $e) { |
| 32 | 32 | if ($debug) { |
| 33 | - echo $e->getTraceAsString() . PHP_EOL; |
|
| 33 | + echo $e->getTraceAsString().PHP_EOL; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | $this->fail($e->getMessage()); |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | $this->fail('No syntax errors were detected, when syntax errors were expected'); |
| 46 | 46 | } catch (QueryException $e) { |
| 47 | 47 | if ($debug) { |
| 48 | - echo $e->getMessage() . PHP_EOL; |
|
| 49 | - echo $e->getTraceAsString() . PHP_EOL; |
|
| 48 | + echo $e->getMessage().PHP_EOL; |
|
| 49 | + echo $e->getTraceAsString().PHP_EOL; |
|
| 50 | 50 | } |
| 51 | 51 | $this->addToAssertionCount(1); |
| 52 | 52 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'], |
| 116 | 116 | |
| 117 | 117 | /* Checks for invalid AbstractSchemaName */ |
| 118 | - ['SELECT u FROM UnknownClass u'], // unknown |
|
| 118 | + ['SELECT u FROM UnknownClass u'], // unknown |
|
| 119 | 119 | ['SELECT u FROM Unknown\Class u'], // unknown with namespace |
| 120 | 120 | ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash |
| 121 | 121 | ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\) |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | */ |
| 589 | 589 | public function testDQLKeywordInJoinIsAllowed() |
| 590 | 590 | { |
| 591 | - self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g'); |
|
| 591 | + self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g'); |
|
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 | /** |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | */ |
| 597 | 597 | public function testDQLKeywordInConditionIsAllowed() |
| 598 | 598 | { |
| 599 | - self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
| 599 | + self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | /* The exception is currently thrown in the SQLWalker, not earlier. |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | */ |
| 702 | 702 | public function testNewLiteralExpression() |
| 703 | 703 | { |
| 704 | - self::assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 704 | + self::assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | /** |
@@ -709,7 +709,7 @@ discard block |
||
| 709 | 709 | */ |
| 710 | 710 | public function testNewLiteralWithSubselectExpression() |
| 711 | 711 | { |
| 712 | - self::assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 712 | + self::assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 713 | 713 | } |
| 714 | 714 | } |
| 715 | 715 | |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | public function testCmsModelSet(string $path) |
| 31 | 31 | { |
| 32 | 32 | $this->em->getConfiguration() |
| 33 | - ->getMetadataDriverImpl() |
|
| 34 | - ->addPaths([$path]); |
|
| 33 | + ->getMetadataDriverImpl() |
|
| 34 | + ->addPaths([$path]); |
|
| 35 | 35 | |
| 36 | 36 | self::assertEmpty($this->validator->validateMapping()); |
| 37 | 37 | } |
@@ -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\Tools; |
| 6 | 6 | |
@@ -42,12 +42,12 @@ discard block |
||
| 42 | 42 | public function modelSetProvider(): array |
| 43 | 43 | { |
| 44 | 44 | return [ |
| 45 | - 'cms' => [__DIR__ . '/../../Models/CMS'], |
|
| 46 | - 'company' => [__DIR__ . '/../../Models/Company'], |
|
| 47 | - 'ecommerce' => [__DIR__ . '/../../Models/ECommerce'], |
|
| 48 | - 'forum' => [__DIR__ . '/../../Models/Forum'], |
|
| 49 | - 'navigation' => [__DIR__ . '/../../Models/Navigation'], |
|
| 50 | - 'routing' => [__DIR__ . '/../../Models/Routing'], |
|
| 45 | + 'cms' => [__DIR__.'/../../Models/CMS'], |
|
| 46 | + 'company' => [__DIR__.'/../../Models/Company'], |
|
| 47 | + 'ecommerce' => [__DIR__.'/../../Models/ECommerce'], |
|
| 48 | + 'forum' => [__DIR__.'/../../Models/Forum'], |
|
| 49 | + 'navigation' => [__DIR__.'/../../Models/Navigation'], |
|
| 50 | + 'routing' => [__DIR__.'/../../Models/Routing'], |
|
| 51 | 51 | ]; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | /** |
| 73 | 73 | * Arbitrary Join |
| 74 | 74 | */ |
| 75 | - public function testLimitSubqueryWithArbitraryJoin() |
|
| 75 | + public function testLimitSubqueryWithArbitraryJoin() |
|
| 76 | 76 | { |
| 77 | 77 | $dql = 'SELECT p, c FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c'; |
| 78 | 78 | $query = $this->entityManager->createQuery($dql); |
@@ -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\Pagination; |
| 6 | 6 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $this->entityManager->getConnection()->setDatabasePlatform(new PostgreSqlPlatform); |
| 85 | 85 | |
| 86 | 86 | $query = $this->entityManager->createQuery( |
| 87 | - 'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC' |
|
| 87 | + 'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC' |
|
| 88 | 88 | ); |
| 89 | 89 | $limitQuery = clone $query; |
| 90 | 90 | $limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, LimitSubqueryOutputWalker::class); |
@@ -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\Pagination; |
| 6 | 6 | |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | { |
| 131 | 131 | $this->expectException(MappingException::class); |
| 132 | 132 | $this->expectExceptionMessage( |
| 133 | - 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
| 133 | + 'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map' |
|
| 134 | 134 | . ' of \'Doctrine\Tests\ORM\Mapping\HierarchyBase\' to be properly mapped in the inheritance hierarchy.' |
| 135 | 135 | . ' Alternatively you can make \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' an abstract class to' |
| 136 | 136 | . ' avoid this exception from occurring.' |
@@ -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\Mapping; |
| 6 | 6 | |
@@ -24,18 +24,18 @@ |
||
| 24 | 24 | public $avatar; |
| 25 | 25 | |
| 26 | 26 | public function getId() { |
| 27 | - return $this->id; |
|
| 27 | + return $this->id; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function getUsername() { |
| 31 | - return $this->username; |
|
| 31 | + return $this->username; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function getAvatar() { |
| 35 | - return $this->avatar; |
|
| 35 | + return $this->avatar; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function setAvatar(ForumAvatar $avatar) { |
| 39 | - $this->avatar = $avatar; |
|
| 39 | + $this->avatar = $avatar; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -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\Models\Forum; |
| 6 | 6 | |
@@ -25,12 +25,12 @@ |
||
| 25 | 25 | |
| 26 | 26 | if ($this->maxRunningTime != 0 && $time > $this->maxRunningTime) { |
| 27 | 27 | $this->fail( |
| 28 | - sprintf( |
|
| 28 | + sprintf( |
|
| 29 | 29 | 'expected running time: <= %s but was: %s', |
| 30 | 30 | |
| 31 | 31 | $this->maxRunningTime, |
| 32 | 32 | $time |
| 33 | - ) |
|
| 33 | + ) |
|
| 34 | 34 | ); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -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; |
| 6 | 6 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function setMaxRunningTime($maxRunningTime) |
| 50 | 50 | { |
| 51 | - if (! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 51 | + if ( ! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 52 | 52 | throw new \InvalidArgumentException; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -2,28 +2,28 @@ |
||
| 2 | 2 | /* |
| 3 | 3 | * This file bootstraps the test environment. |
| 4 | 4 | */ |
| 5 | -declare(strict_types=1); |
|
| 5 | +declare(strict_types = 1); |
|
| 6 | 6 | |
| 7 | 7 | namespace Doctrine\Tests; |
| 8 | 8 | |
| 9 | 9 | error_reporting(E_ALL | E_STRICT); |
| 10 | 10 | date_default_timezone_set('UTC'); |
| 11 | 11 | |
| 12 | -if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) { |
|
| 12 | +if (file_exists(__DIR__.'/../../../vendor/autoload.php')) { |
|
| 13 | 13 | // dependencies were installed via composer - this is the main project |
| 14 | - require __DIR__ . '/../../../vendor/autoload.php'; |
|
| 15 | -} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) { |
|
| 14 | + require __DIR__.'/../../../vendor/autoload.php'; |
|
| 15 | +} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) { |
|
| 16 | 16 | // installed as a dependency in `vendor` |
| 17 | - require __DIR__ . '/../../../../../autoload.php'; |
|
| 17 | + require __DIR__.'/../../../../../autoload.php'; |
|
| 18 | 18 | } else { |
| 19 | 19 | throw new \Exception('Can\'t find autoload.php. Did you install dependencies via composer?'); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -if ( ! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) { |
|
| 23 | - throw new \Exception("Could not create " . __DIR__."/Proxies Folder."); |
|
| 22 | +if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) { |
|
| 23 | + throw new \Exception("Could not create ".__DIR__."/Proxies Folder."); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -if ( ! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) { |
|
| 27 | - throw new \Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.'); |
|
| 26 | +if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) { |
|
| 27 | + throw new \Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.'); |
|
| 28 | 28 | } |
| 29 | 29 | |