@@ -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\Ticket; |
6 | 6 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $this->em->flush(); |
44 | 44 | $this->em->clear(); |
45 | 45 | |
46 | - $children = $this->em->createQuery('select c,p from ' . __NAMESPACE__ . '\DDC371Child c ' |
|
46 | + $children = $this->em->createQuery('select c,p from '.__NAMESPACE__.'\DDC371Child c ' |
|
47 | 47 | . 'left join c.parent p where c.id = 1 and p.id = 1') |
48 | 48 | ->setHint(Query::HINT_REFRESH, true) |
49 | 49 | ->getResult(); |
@@ -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\Ticket; |
6 | 6 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $this->em->persist($group); |
38 | 38 | $this->em->flush(); |
39 | 39 | |
40 | - if (! $user->getGroups()->contains($group)) { |
|
40 | + if ( ! $user->getGroups()->contains($group)) { |
|
41 | 41 | $user->getGroups()->add($group); |
42 | 42 | $group->getUsers()->add($user); |
43 | 43 | $this->em->flush(); |
@@ -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\Ticket; |
6 | 6 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
80 | 80 | { |
81 | - if (! $value instanceof GH6141People) { |
|
81 | + if ( ! $value instanceof GH6141People) { |
|
82 | 82 | $value = GH6141People::get($value); |
83 | 83 | } |
84 | 84 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public static function get($value) |
123 | 123 | { |
124 | - if (! self::isValid($value)) { |
|
124 | + if ( ! self::isValid($value)) { |
|
125 | 125 | throw new \InvalidArgumentException(); |
126 | 126 | } |
127 | 127 |
@@ -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 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $driver = new DatabaseDriver($sm); |
57 | 57 | |
58 | 58 | foreach ($driver->getAllClassNames() as $className) { |
59 | - if (! in_array(strtolower($className), $classNames, true)) { |
|
59 | + if ( ! in_array(strtolower($className), $classNames, true)) { |
|
60 | 60 | continue; |
61 | 61 | } |
62 | 62 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | if (count($metadatas) != count($classNames)) { |
71 | - $this->fail("Have not found all classes matching the names '" . implode(', ', $classNames) . "' only tables " . implode(', ', array_keys($metadatas))); |
|
71 | + $this->fail("Have not found all classes matching the names '".implode(', ', $classNames)."' only tables ".implode(', ', array_keys($metadatas))); |
|
72 | 72 | } |
73 | 73 | return $metadatas; |
74 | 74 | } |
@@ -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 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | while ($worker->work()) { |
30 | 30 | if ($worker->returnCode() != GEARMAN_SUCCESS) { |
31 | - echo 'return_code: ' . $worker->returnCode() . "\n"; |
|
31 | + echo 'return_code: '.$worker->returnCode()."\n"; |
|
32 | 32 | break; |
33 | 33 | } |
34 | 34 | } |
@@ -79,18 +79,18 @@ discard block |
||
79 | 79 | |
80 | 80 | protected function processWorkload($job) |
81 | 81 | { |
82 | - echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n"; |
|
82 | + echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n"; |
|
83 | 83 | |
84 | 84 | $workload = $job->workload(); |
85 | 85 | $workload = unserialize($workload); |
86 | 86 | |
87 | - if (! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
87 | + if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
88 | 88 | throw new \InvalidArgumentException('Missing Database parameters'); |
89 | 89 | } |
90 | 90 | |
91 | 91 | $this->em = $this->createEntityManager($workload['conn']); |
92 | 92 | |
93 | - if (! isset($workload['fixture'])) { |
|
93 | + if ( ! isset($workload['fixture'])) { |
|
94 | 94 | throw new \InvalidArgumentException('Missing Fixture parameters'); |
95 | 95 | } |
96 | 96 | return $workload['fixture']; |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | protected function createEntityManager($conn) |
100 | 100 | { |
101 | 101 | $config = new Configuration(); |
102 | - $config->setProxyDir(__DIR__ . '/../../../Proxies'); |
|
102 | + $config->setProxyDir(__DIR__.'/../../../Proxies'); |
|
103 | 103 | $config->setProxyNamespace('MyProject\Proxies'); |
104 | 104 | $config->setAutoGenerateProxyClasses(true); |
105 | 105 | |
106 | - $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']); |
|
106 | + $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']); |
|
107 | 107 | $config->setMetadataDriverImpl($annotDriver); |
108 | 108 | |
109 | 109 | $cache = new ArrayCache(); |
@@ -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 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $article = new CmsArticle(); |
90 | 90 | |
91 | 91 | $this->expectException(\InvalidArgumentException::class); |
92 | - $this->expectExceptionMessage('Entity ' . CmsArticle::class); |
|
92 | + $this->expectExceptionMessage('Entity '.CmsArticle::class); |
|
93 | 93 | |
94 | 94 | $this->em->lock($article, LockMode::OPTIMISTIC, $article->version + 1); |
95 | 95 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | $writeLockSql = $this->em->getConnection()->getDatabasePlatform()->getWriteLockSQL(); |
140 | 140 | |
141 | - if (! $writeLockSql) { |
|
141 | + if ( ! $writeLockSql) { |
|
142 | 142 | $this->markTestSkipped('Database Driver has no Write Lock support.'); |
143 | 143 | } |
144 | 144 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | $readLockSql = $this->em->getConnection()->getDatabasePlatform()->getReadLockSQL(); |
175 | 175 | |
176 | - if (! $readLockSql) { |
|
176 | + if ( ! $readLockSql) { |
|
177 | 177 | $this->markTestSkipped('Database Driver has no Write Lock support.'); |
178 | 178 | } |
179 | 179 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function testLockOptimisticNonVersionedThrowsExceptionInDQL() |
208 | 208 | { |
209 | - $dql = 'SELECT u FROM ' . CmsUser::class . " u WHERE u.username = 'gblanco'"; |
|
209 | + $dql = 'SELECT u FROM '.CmsUser::class." u WHERE u.username = 'gblanco'"; |
|
210 | 210 | |
211 | 211 | $this->expectException(OptimisticLockException::class); |
212 | 212 | $this->expectExceptionMessage('The optimistic lock on an entity failed.'); |
@@ -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 |
@@ -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 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function testDropPartSchemaWithForeignKeys() |
59 | 59 | { |
60 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
60 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
61 | 61 | $this->markTestSkipped('Foreign Key test'); |
62 | 62 | } |
63 | 63 |
@@ -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 | |
@@ -86,6 +86,6 @@ discard block |
||
86 | 86 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
87 | 87 | $sql = array_filter($sql, function($sql) { return strpos($sql, 'DROP') === false; }); |
88 | 88 | |
89 | - self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql)); |
|
89 | + self::assertCount(0, $sql, 'SQL: '.implode(PHP_EOL, $sql)); |
|
90 | 90 | } |
91 | 91 | } |