@@ -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) { |
@@ -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 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | protected function setUp() |
21 | 21 | { |
22 | - if (!class_exists('GearmanClient', false)) { |
|
22 | + if ( ! class_exists('GearmanClient', false)) { |
|
23 | 23 | $this->markTestSkipped('pecl/gearman is required for this test to run.'); |
24 | 24 | } |
25 | 25 | |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | $this->gearman->runTasks(); |
136 | 136 | |
137 | 137 | self::assertTrue($this->maxRunTime > $forTime, |
138 | - "Because of locking this tests should have run at least " . $forTime . " seconds, ". |
|
139 | - "but only did for " . $this->maxRunTime . " seconds."); |
|
138 | + "Because of locking this tests should have run at least ".$forTime." seconds, ". |
|
139 | + "but only did for ".$this->maxRunTime." seconds."); |
|
140 | 140 | self::assertTrue($this->maxRunTime < $notLongerThan, |
141 | - "The longest task should not run longer than " . $notLongerThan . " seconds, ". |
|
142 | - "but did for " . $this->maxRunTime . " seconds." |
|
141 | + "The longest task should not run longer than ".$notLongerThan." seconds, ". |
|
142 | + "but did for ".$this->maxRunTime." seconds." |
|
143 | 143 | ); |
144 | 144 | } |
145 | 145 |