@@ -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 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | try { |
46 | 46 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
47 | 47 | } catch (\Exception $e) { |
48 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
48 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | { |
206 | 206 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
207 | 207 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
208 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
208 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
209 | 209 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
210 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
210 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
211 | 211 | |
212 | 212 | $identificationVariableDecl->joins[] = $join; |
213 | 213 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $userMetadata = $entityManager->getClassMetadata(CmsUser::class); |
217 | 217 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
218 | 218 | |
219 | - $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
219 | + $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable.'a', |
|
220 | 220 | [ |
221 | 221 | 'metadata' => $addressMetadata, |
222 | 222 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -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 | |
@@ -88,6 +88,6 @@ discard block |
||
88 | 88 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
89 | 89 | { |
90 | 90 | // getParameter applies quoting automatically |
91 | - return $targetTableAlias . '.id = ' . $this->getParameter('id'); |
|
91 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
92 | 92 | } |
93 | 93 | } |
@@ -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\Persisters; |
6 | 6 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $method = new \ReflectionMethod($this->persister, 'getSelectConditionSQL'); |
94 | 94 | $method->setAccessible(true); |
95 | 95 | |
96 | - $sql = $method->invoke($this->persister, ['customInteger' => 1, 'child' => 1]); |
|
96 | + $sql = $method->invoke($this->persister, ['customInteger' => 1, 'child' => 1]); |
|
97 | 97 | |
98 | 98 | self::assertEquals('t0."customInteger" = ABS(?) AND t0."child_id" = ?', $sql); |
99 | 99 | } |
@@ -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\Persisters; |
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\Functional\SchemaTool; |
6 | 6 | |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | parent::setUp(); |
17 | 17 | |
18 | 18 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') { |
19 | - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of postgresql.'); |
|
19 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of postgresql.'); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 |
@@ -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\SchemaTool; |
6 | 6 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function testDropPartSchemaWithForeignKeys() |
60 | 60 | { |
61 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
61 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
62 | 62 | $this->markTestSkipped("Foreign Key test"); |
63 | 63 | } |
64 | 64 |
@@ -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\SchemaTool; |
6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $updateSql = $this->schemaTool->getUpdateSchemaSql([$class]); |
32 | 32 | |
33 | - $updateSql = array_filter($updateSql, function ($sql) { |
|
33 | + $updateSql = array_filter($updateSql, function($sql) { |
|
34 | 34 | return strpos($sql, 'DBAL483') !== false; |
35 | 35 | }); |
36 | 36 |
@@ -36,37 +36,37 @@ |
||
36 | 36 | $dql = "SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u"; |
37 | 37 | |
38 | 38 | $users = $this->em->createQuery($dql) |
39 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
40 | - ->getResult(); |
|
39 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
40 | + ->getResult(); |
|
41 | 41 | |
42 | 42 | $c = $this->getCurrentQueryCount(); |
43 | 43 | $users = $this->em->createQuery($dql) |
44 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
45 | - ->getResult(); |
|
44 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
45 | + ->getResult(); |
|
46 | 46 | |
47 | 47 | self::assertEquals($c, $this->getCurrentQueryCount(), "Should not execute query. Its cached!"); |
48 | 48 | |
49 | 49 | $users = $this->em->createQuery($dql) |
50 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
51 | - ->getArrayResult(); |
|
50 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
51 | + ->getArrayResult(); |
|
52 | 52 | |
53 | 53 | self::assertEquals($c + 1, $this->getCurrentQueryCount(), "Hydration is part of cache key."); |
54 | 54 | |
55 | 55 | $users = $this->em->createQuery($dql) |
56 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
57 | - ->getArrayResult(); |
|
56 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
57 | + ->getArrayResult(); |
|
58 | 58 | |
59 | 59 | self::assertEquals($c + 1, $this->getCurrentQueryCount(), "Hydration now cached"); |
60 | 60 | |
61 | 61 | $users = $this->em->createQuery($dql) |
62 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
63 | - ->getArrayResult(); |
|
62 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
63 | + ->getArrayResult(); |
|
64 | 64 | |
65 | 65 | self::assertTrue($cache->contains('cachekey'), 'Explicit cache key'); |
66 | 66 | |
67 | 67 | $users = $this->em->createQuery($dql) |
68 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
69 | - ->getArrayResult(); |
|
68 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
69 | + ->getArrayResult(); |
|
70 | 70 | self::assertEquals($c + 2, $this->getCurrentQueryCount(), "Hydration now cached"); |
71 | 71 | } |
72 | 72 |
@@ -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 |
@@ -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\Locking; |
6 | 6 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $test = new OptimisticStandard(); |
119 | 119 | |
120 | 120 | for ($i = 0; $i < 5; $i++) { |
121 | - $test->name = 'test' . $i; |
|
121 | + $test->name = 'test'.$i; |
|
122 | 122 | |
123 | 123 | $this->em->persist($test); |
124 | 124 | $this->em->flush(); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $caughtException = null; |
253 | 253 | |
254 | 254 | try { |
255 | - $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp()-3600)); |
|
255 | + $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp() - 3600)); |
|
256 | 256 | |
257 | 257 | $this->em->lock($test, LockMode::OPTIMISTIC, $expectedVersionExpired); |
258 | 258 | } catch (OptimisticLockException $e) { |