@@ -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 |
@@ -23,7 +23,6 @@ |
||
23 | 23 | namespace Doctrine\ORM\Cache; |
24 | 24 | |
25 | 25 | use Doctrine\Common\Util\ClassUtils; |
26 | - |
|
27 | 26 | use Doctrine\ORM\Mapping\FetchMode; |
28 | 27 | use Doctrine\ORM\Mapping\FieldMetadata; |
29 | 28 | use Doctrine\ORM\Mapping\OneToOneAssociationMetadata; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Cache; |
7 | 7 | |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $data = array_merge($data, $persister->getIdentifier($entity)); // why update has no identifier values ? |
60 | 60 | |
61 | 61 | foreach ($metadata->getProperties() as $name => $association) { |
62 | - if (! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
62 | + if ( ! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
63 | 63 | continue; |
64 | 64 | } |
65 | 65 | |
66 | - if (! $association instanceof ToOneAssociationMetadata) { |
|
66 | + if ( ! $association instanceof ToOneAssociationMetadata) { |
|
67 | 67 | unset($data[$name]); |
68 | 68 | |
69 | 69 | continue; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $targetClassMetadata = $this->em->getClassMetadata($targetEntity); |
74 | 74 | $targetPersister = $this->uow->getEntityPersister($targetEntity); |
75 | 75 | |
76 | - if (! $association->getCache()) { |
|
76 | + if ( ! $association->getCache()) { |
|
77 | 77 | $owningAssociation = ! $association->isOwningSide() |
78 | 78 | ? $targetClassMetadata->getProperty($association->getMappedBy()) |
79 | 79 | : $association; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | continue; |
122 | 122 | } |
123 | 123 | |
124 | - if (! $association->isPrimaryKey()) { |
|
124 | + if ( ! $association->isPrimaryKey()) { |
|
125 | 125 | $targetClass = ClassUtils::getClass($data[$name]); |
126 | 126 | $targetId = $this->uow->getEntityIdentifier($data[$name]); |
127 | 127 | $data[$name] = new AssociationCacheEntry($targetClass, $targetId); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide()) |
172 | 172 | ); |
173 | 173 | |
174 | - if (! $isEagerLoad) { |
|
174 | + if ( ! $isEagerLoad) { |
|
175 | 175 | $data[$name] = $this->em->getReference($assocClass, $assocId); |
176 | 176 | |
177 | 177 | continue; |
@@ -45,6 +45,7 @@ |
||
45 | 45 | * {@inheritDoc} |
46 | 46 | * |
47 | 47 | * @param MultiGetCache $cache |
48 | + * @param string $name |
|
48 | 49 | */ |
49 | 50 | public function __construct($name, MultiGetCache $cache, $lifetime = 0) |
50 | 51 | { |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Cache\Region; |
7 | 7 |
@@ -600,7 +600,7 @@ |
||
600 | 600 | * Clears the EntityManager. All entities that are currently managed |
601 | 601 | * by this EntityManager become detached. |
602 | 602 | * |
603 | - * @param null $entityName Unused. @todo Remove from ObjectManager. |
|
603 | + * @param string|null $entityName Unused. @todo Remove from ObjectManager. |
|
604 | 604 | * |
605 | 605 | * @return void |
606 | 606 | */ |
@@ -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\ORM; |
6 | 6 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
382 | 382 | $className = $class->getClassName(); |
383 | 383 | |
384 | - if (! is_array($id)) { |
|
384 | + if ( ! is_array($id)) { |
|
385 | 385 | if ($class->isIdentifierComposite()) { |
386 | 386 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
387 | 387 | } |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | */ |
801 | 801 | public function isOpen() |
802 | 802 | { |
803 | - return (!$this->closed); |
|
803 | + return ( ! $this->closed); |
|
804 | 804 | } |
805 | 805 | |
806 | 806 | /** |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | sprintf( |
912 | 912 | 'Invalid $connection argument of type %s given%s.', |
913 | 913 | is_object($connection) ? get_class($connection) : gettype($connection), |
914 | - is_object($connection) ? '' : ': "' . $connection . '"' |
|
914 | + is_object($connection) ? '' : ': "'.$connection.'"' |
|
915 | 915 | ) |
916 | 916 | ); |
917 | 917 | } |