@@ -302,8 +302,8 @@ |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | - * @group DDC-1955 |
|
| 306 | - */ |
|
| 305 | + * @group DDC-1955 |
|
| 306 | + */ |
|
| 307 | 307 | public function testLifecycleCallbackEventArgs() |
| 308 | 308 | { |
| 309 | 309 | $e = new LifecycleCallbackEventArgEntity; |
@@ -396,8 +396,16 @@ |
||
| 396 | 396 | private $name; |
| 397 | 397 | public function getId() {return $this->id;} |
| 398 | 398 | public function getValue() {return $this->value;} |
| 399 | + |
|
| 400 | + /** |
|
| 401 | + * @param string $value |
|
| 402 | + */ |
|
| 399 | 403 | public function setValue($value) {$this->value = $value;} |
| 400 | 404 | public function getName() {return $this->name;} |
| 405 | + |
|
| 406 | + /** |
|
| 407 | + * @param string $name |
|
| 408 | + */ |
|
| 401 | 409 | public function setName($name) {$this->name = $name;} |
| 402 | 410 | /** @ORM\PreUpdate */ |
| 403 | 411 | public function testCallback() {$this->value = 'Hello World';} |
@@ -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 | |
@@ -394,13 +394,13 @@ discard block |
||
| 394 | 394 | private $value; |
| 395 | 395 | /** @ORM\Column(type="string") */ |
| 396 | 396 | private $name; |
| 397 | - public function getId() {return $this->id;} |
|
| 398 | - public function getValue() {return $this->value;} |
|
| 399 | - public function setValue($value) {$this->value = $value;} |
|
| 400 | - public function getName() {return $this->name;} |
|
| 401 | - public function setName($name) {$this->name = $name;} |
|
| 397 | + public function getId() {return $this->id; } |
|
| 398 | + public function getValue() {return $this->value; } |
|
| 399 | + public function setValue($value) {$this->value = $value; } |
|
| 400 | + public function getName() {return $this->name; } |
|
| 401 | + public function setName($name) {$this->name = $name; } |
|
| 402 | 402 | /** @ORM\PreUpdate */ |
| 403 | - public function testCallback() {$this->value = 'Hello World';} |
|
| 403 | + public function testCallback() {$this->value = 'Hello World'; } |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | /** |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class ResultCacheTest extends OrmFunctionalTestCase |
| 18 | 18 | { |
| 19 | - /** |
|
| 19 | + /** |
|
| 20 | 20 | * @var \ReflectionProperty |
| 21 | 21 | */ |
| 22 | 22 | private $cacheDataReflection; |
@@ -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\Functional; |
| 6 | 6 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | public function providerParameterTypeInferer() |
| 15 | 15 | { |
| 16 | - $data = [ |
|
| 16 | + $data = [ |
|
| 17 | 17 | [1, Type::INTEGER], |
| 18 | 18 | ["bar", PDO::PARAM_STR], |
| 19 | 19 | ["1", PDO::PARAM_STR], |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | [["1","2"], Connection::PARAM_STR_ARRAY], |
| 24 | 24 | [[], Connection::PARAM_STR_ARRAY], |
| 25 | 25 | [true, Type::BOOLEAN], |
| 26 | - ]; |
|
| 26 | + ]; |
|
| 27 | 27 | |
| 28 | 28 | if (PHP_VERSION_ID >= 50500) { |
| 29 | 29 | $data[] = [new \DateTimeImmutable(), Type::DATETIME]; |
@@ -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 | |
@@ -16,15 +16,15 @@ discard block |
||
| 16 | 16 | public function providerParameterTypeInferer() |
| 17 | 17 | { |
| 18 | 18 | $data = [ |
| 19 | - [1, Type::INTEGER], |
|
| 20 | - ["bar", PDO::PARAM_STR], |
|
| 21 | - ["1", PDO::PARAM_STR], |
|
| 22 | - [new \DateTime, Type::DATETIME], |
|
| 23 | - [[2], Connection::PARAM_INT_ARRAY], |
|
| 24 | - [["foo"], Connection::PARAM_STR_ARRAY], |
|
| 25 | - [["1","2"], Connection::PARAM_STR_ARRAY], |
|
| 26 | - [[], Connection::PARAM_STR_ARRAY], |
|
| 27 | - [true, Type::BOOLEAN], |
|
| 19 | + [1, Type::INTEGER], |
|
| 20 | + ["bar", PDO::PARAM_STR], |
|
| 21 | + ["1", PDO::PARAM_STR], |
|
| 22 | + [new \DateTime, Type::DATETIME], |
|
| 23 | + [[2], Connection::PARAM_INT_ARRAY], |
|
| 24 | + [["foo"], Connection::PARAM_STR_ARRAY], |
|
| 25 | + [["1", "2"], Connection::PARAM_STR_ARRAY], |
|
| 26 | + [[], Connection::PARAM_STR_ARRAY], |
|
| 27 | + [true, Type::BOOLEAN], |
|
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | 30 | if (PHP_VERSION_ID >= 50500) { |
@@ -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); |
@@ -23,6 +23,9 @@ discard block |
||
| 23 | 23 | $this->em = $this->getTestEntityManager(); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param string $dql |
|
| 28 | + */ |
|
| 26 | 29 | public function assertValidDQL($dql, $debug = false) |
| 27 | 30 | { |
| 28 | 31 | try { |
@@ -37,6 +40,9 @@ discard block |
||
| 37 | 40 | } |
| 38 | 41 | } |
| 39 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $dql |
|
| 45 | + */ |
|
| 40 | 46 | public function assertInvalidDQL($dql, $debug = false) |
| 41 | 47 | { |
| 42 | 48 | try { |
@@ -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 | |