@@ -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 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | $contracts = $this->em->createQuery('SELECT c FROM Doctrine\Tests\Models\Company\CompanyContract c ORDER BY c.id')->getScalarResult(); |
232 | 232 | |
233 | - $discrValues = \array_map(function ($a) { |
|
233 | + $discrValues = \array_map(function($a) { |
|
234 | 234 | return $a['c_discr']; |
235 | 235 | }, $contracts); |
236 | 236 | |
@@ -332,19 +332,19 @@ discard block |
||
332 | 332 | |
333 | 333 | $repos = $this->em->getRepository(CompanyContract::class); |
334 | 334 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
335 | - self::assertCount(3, $contracts, 'There should be 3 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyContract'"); |
|
335 | + self::assertCount(3, $contracts, 'There should be 3 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyContract'"); |
|
336 | 336 | |
337 | 337 | $repos = $this->em->getRepository(CompanyFixContract::class); |
338 | 338 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
339 | - self::assertCount(1, $contracts, 'There should be 1 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFixContract'"); |
|
339 | + self::assertCount(1, $contracts, 'There should be 1 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFixContract'"); |
|
340 | 340 | |
341 | 341 | $repos = $this->em->getRepository(CompanyFlexContract::class); |
342 | 342 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
343 | - self::assertCount(2, $contracts, 'There should be 2 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexContract'"); |
|
343 | + self::assertCount(2, $contracts, 'There should be 2 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexContract'"); |
|
344 | 344 | |
345 | 345 | $repos = $this->em->getRepository(CompanyFlexUltraContract::class); |
346 | 346 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
347 | - self::assertCount(1, $contracts, 'There should be 1 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'"); |
|
347 | + self::assertCount(1, $contracts, 'There should be 1 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'"); |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | /** |
@@ -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 | |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | $this->secondLevelCacheLogger->clearStats(); |
805 | 805 | $this->em->clear(); |
806 | 806 | |
807 | - $getHash = function (AbstractQuery $query) { |
|
807 | + $getHash = function(AbstractQuery $query) { |
|
808 | 808 | $method = new \ReflectionMethod($query, 'getHash'); |
809 | 809 | $method->setAccessible(true); |
810 | 810 |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
87 | 87 | $sql = array_filter($sql, function ($sql) { |
88 | - return strpos($sql, 'DROP') === false; }); |
|
88 | + return strpos($sql, 'DROP') === false; }); |
|
89 | 89 | |
90 | 90 | self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql)); |
91 | 91 | } |
@@ -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 | |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $schemaDiff = $comparator->compare($fromSchema, $toSchema); |
85 | 85 | |
86 | 86 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
87 | - $sql = array_filter($sql, function ($sql) { |
|
87 | + $sql = array_filter($sql, function($sql) { |
|
88 | 88 | return strpos($sql, 'DROP') === false; }); |
89 | 89 | |
90 | - self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql)); |
|
90 | + self::assertCount(0, $sql, 'SQL: '.implode(PHP_EOL, $sql)); |
|
91 | 91 | } |
92 | 92 | } |
@@ -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 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | $listener = new ListenerSecondLevelCacheTest( |
201 | 201 | [ |
202 | - Events::postFlush => function () { |
|
202 | + Events::postFlush => function() { |
|
203 | 203 | throw new \RuntimeException('post flush failure'); |
204 | 204 | }, |
205 | 205 | ] |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | $listener = new ListenerSecondLevelCacheTest( |
235 | 235 | [ |
236 | - Events::postUpdate => function () { |
|
236 | + Events::postUpdate => function() { |
|
237 | 237 | throw new \RuntimeException('post update failure'); |
238 | 238 | }, |
239 | 239 | ] |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | self::assertInstanceOf(State::class, $state); |
253 | 253 | self::assertEquals($stateName, $state->getName()); |
254 | 254 | |
255 | - $state->setName($stateName . uniqid()); |
|
255 | + $state->setName($stateName.uniqid()); |
|
256 | 256 | |
257 | 257 | $this->em->persist($state); |
258 | 258 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $this->em->clear(); |
281 | 281 | |
282 | 282 | $listener = new ListenerSecondLevelCacheTest([ |
283 | - Events::postRemove => function () { |
|
283 | + Events::postRemove => function() { |
|
284 | 284 | throw new \RuntimeException('post remove failure'); |
285 | 285 | }, |
286 | 286 | ]); |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache()); |
68 | 68 | |
69 | - Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php'); |
|
69 | + Annotations\AnnotationRegistry::registerFile(__DIR__.'/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php'); |
|
70 | 70 | |
71 | 71 | return new AnnotationDriver($reader, (array) $paths); |
72 | 72 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
104 | 104 | $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL); |
105 | 105 | $config->setMetadataDriverImpl( |
106 | - $config->newDefaultAnnotationDriver([realpath(__DIR__ . '/Models/Cache')]) |
|
106 | + $config->newDefaultAnnotationDriver([realpath(__DIR__.'/Models/Cache')]) |
|
107 | 107 | ); |
108 | 108 | |
109 | 109 | if ($this->isSecondLevelCacheEnabled) { |
@@ -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\Cache; |
6 | 6 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | protected function createRegion() |
54 | 54 | { |
55 | - $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid(); |
|
55 | + $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid(); |
|
56 | 56 | |
57 | 57 | $region = new DefaultRegion('concurren_region_test', $this->cache); |
58 | 58 | |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | $reflectionDirectory->setAccessible(true); |
256 | 256 | $reflectionDirectory->setValue($region, str_repeat('a', 10000)); |
257 | 257 | |
258 | - set_error_handler(function () {}, E_WARNING); |
|
258 | + set_error_handler(function() {}, E_WARNING); |
|
259 | 259 | self::assertTrue($region->evictAll()); |
260 | 260 | restore_error_handler(); |
261 | 261 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | |
129 | 129 | $sql = $tool->getUpdateSchemaSql($classes); |
130 | 130 | $sql = array_filter($sql, function ($sql) { |
131 | - return strpos($sql, 'DROP SEQUENCE stonewood.') === 0; }); |
|
131 | + return strpos($sql, 'DROP SEQUENCE stonewood.') === 0; }); |
|
132 | 132 | |
133 | 133 | self::assertCount(0, $sql, implode("\n", $sql)); |
134 | 134 | } |
@@ -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 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $tool->createSchema($classes); |
128 | 128 | |
129 | 129 | $sql = $tool->getUpdateSchemaSql($classes); |
130 | - $sql = array_filter($sql, function ($sql) { |
|
130 | + $sql = array_filter($sql, function($sql) { |
|
131 | 131 | return strpos($sql, 'DROP SEQUENCE stonewood.') === 0; }); |
132 | 132 | |
133 | 133 | self::assertCount(0, $sql, implode("\n", $sql)); |
@@ -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 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function testIssue2059() |
32 | 32 | { |
33 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
33 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
34 | 34 | $this->markTestSkipped('Platform does not support foreign keys.'); |
35 | 35 | } |
36 | 36 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | public function testLoadMetadataFromDatabase() |
54 | 54 | { |
55 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
55 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
56 | 56 | $this->markTestSkipped('Platform does not support foreign keys.'); |
57 | 57 | } |
58 | 58 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | public function testLoadMetadataWithForeignKeyFromDatabase() |
92 | 92 | { |
93 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
93 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
94 | 94 | $this->markTestSkipped('Platform does not support foreign keys.'); |
95 | 95 | } |
96 | 96 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | public function testDetectManyToManyTables() |
125 | 125 | { |
126 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
126 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
127 | 127 | $this->markTestSkipped('Platform does not support foreign keys.'); |
128 | 128 | } |
129 | 129 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | self::assertNotEmpty($indexes['index1']['columns']); |
246 | 246 | self::assertEquals( |
247 | - ['column_index1','column_index2'], |
|
247 | + ['column_index1', 'column_index2'], |
|
248 | 248 | $indexes['index1']['columns'] |
249 | 249 | ); |
250 | 250 |
@@ -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 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $fieldSelection = new DDC2602FieldSelection(); |
157 | 157 | |
158 | 158 | $fieldSelection->field = $field; |
159 | - $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) { |
|
159 | + $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) { |
|
160 | 160 | return in_array($choice->id, $choiceList, true); |
161 | 161 | }); |
162 | 162 |