@@ -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\Decorator; |
| 6 | 6 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | if ($method->getName() === 'transactional') { |
| 56 | 56 | return [ |
| 57 | 57 | $method->getName(), |
| 58 | - [function () { |
|
| 58 | + [function() { |
|
| 59 | 59 | }, |
| 60 | 60 | ], |
| 61 | 61 | ]; |
@@ -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 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $entity = new DDC1526Menu; |
| 30 | 30 | |
| 31 | 31 | if (isset($parents[($i % 3)])) { |
| 32 | - $entity->parent = $parents[($i%3)]; |
|
| 32 | + $entity->parent = $parents[($i % 3)]; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $this->em->persist($entity); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $this->em->clear(); |
| 40 | 40 | |
| 41 | 41 | $dql = 'SELECT m, c |
| 42 | - FROM ' . __NAMESPACE__ . '\DDC1526Menu m |
|
| 42 | + FROM ' . __NAMESPACE__.'\DDC1526Menu m |
|
| 43 | 43 | LEFT JOIN m.children c'; |
| 44 | 44 | $menus = $this->em->createQuery($dql)->getResult(); |
| 45 | 45 | |
@@ -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 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | // Show difference between expected and actual queries on error |
| 27 | 27 | self::assertEquals( |
| 28 | - 'SELECT _a FROM ' . __NAMESPACE__ . '\DDC1757A _a, ' . __NAMESPACE__ . '\DDC1757B _b INNER JOIN _b.c _c INNER JOIN _c.d _d', |
|
| 28 | + 'SELECT _a FROM '.__NAMESPACE__.'\DDC1757A _a, '.__NAMESPACE__.'\DDC1757B _b INNER JOIN _b.c _c INNER JOIN _c.d _d', |
|
| 29 | 29 | $dql, |
| 30 | 30 | 'Wrong DQL query' |
| 31 | 31 | ); |
@@ -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; |
| 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 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | public function testLoadMetadataFromDatabaseDetail() |
| 165 | 165 | { |
| 166 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 166 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 167 | 167 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 168 | 168 | } |
| 169 | 169 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | // FIXME: Condition here is fugly. |
| 204 | 204 | // NOTE: PostgreSQL and SQL SERVER do not support UNSIGNED integer |
| 205 | - if (! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform && |
|
| 205 | + if ( ! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform && |
|
| 206 | 206 | ! $this->em->getConnection()->getDatabasePlatform() instanceof SQLServerPlatform) { |
| 207 | 207 | self::assertNotNull($metadata->getProperty('columnUnsigned')); |
| 208 | 208 | |
@@ -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; |
| 6 | 6 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | public function assertCollectionEquals(Collection $first, Collection $second) |
| 40 | 40 | { |
| 41 | - return $first->forAll(function ($k, $e) use ($second) { |
|
| 41 | + return $first->forAll(function($k, $e) use ($second) { |
|
| 42 | 42 | return $second->contains($e); |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -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 | |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | self::assertTrue( |
| 138 | 138 | $this->maxRunTime > $forTime, |
| 139 | - 'Because of locking this tests should have run at least ' . $forTime . ' seconds, ' . |
|
| 140 | - 'but only did for ' . $this->maxRunTime . ' seconds.' |
|
| 139 | + 'Because of locking this tests should have run at least '.$forTime.' seconds, '. |
|
| 140 | + 'but only did for '.$this->maxRunTime.' seconds.' |
|
| 141 | 141 | ); |
| 142 | 142 | self::assertTrue( |
| 143 | 143 | $this->maxRunTime < $notLongerThan, |
| 144 | - 'The longest task should not run longer than ' . $notLongerThan . ' seconds, ' . |
|
| 145 | - 'but did for ' . $this->maxRunTime . ' seconds.' |
|
| 144 | + 'The longest task should not run longer than '.$notLongerThan.' seconds, '. |
|
| 145 | + 'but did for '.$this->maxRunTime.' seconds.' |
|
| 146 | 146 | ); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -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 | } |
@@ -53,14 +53,14 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function findWithLock($job) |
| 55 | 55 | { |
| 56 | - return $this->process($job, function ($fixture, $em) { |
|
| 56 | + return $this->process($job, function($fixture, $em) { |
|
| 57 | 57 | $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']); |
| 58 | 58 | }); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function dqlWithLock($job) |
| 62 | 62 | { |
| 63 | - return $this->process($job, function ($fixture, $em) { |
|
| 63 | + return $this->process($job, function($fixture, $em) { |
|
| 64 | 64 | /* @var $query Doctrine\ORM\Query */ |
| 65 | 65 | $query = $em->createQuery($fixture['dql']); |
| 66 | 66 | $query->setLockMode($fixture['lockMode']); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function lock($job) |
| 73 | 73 | { |
| 74 | - return $this->process($job, function ($fixture, $em) { |
|
| 74 | + return $this->process($job, function($fixture, $em) { |
|
| 75 | 75 | $entity = $em->find($fixture['entityName'], $fixture['entityId']); |
| 76 | 76 | $em->lock($entity, $fixture['lockMode']); |
| 77 | 77 | }); |
@@ -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(); |
@@ -136,24 +136,24 @@ |
||
| 136 | 136 | ->will($this->returnValue(10)); |
| 137 | 137 | |
| 138 | 138 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 139 | - ->setMethods(['getSqlExecutor']) |
|
| 140 | - ->getMock(); |
|
| 139 | + ->setMethods(['getSqlExecutor']) |
|
| 140 | + ->getMock(); |
|
| 141 | 141 | $parserResultMock->expects($this->once()) |
| 142 | - ->method('getSqlExecutor') |
|
| 143 | - ->will($this->returnValue($sqlExecMock)); |
|
| 142 | + ->method('getSqlExecutor') |
|
| 143 | + ->will($this->returnValue($sqlExecMock)); |
|
| 144 | 144 | |
| 145 | 145 | $cache = $this->getMockBuilder(CacheProvider::class) |
| 146 | - ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | - ->getMock(); |
|
| 146 | + ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | + ->getMock(); |
|
| 148 | 148 | |
| 149 | 149 | $cache->expects($this->at(0))->method('doFetch')->will($this->returnValue(1)); |
| 150 | 150 | $cache->expects($this->at(1)) |
| 151 | - ->method('doFetch') |
|
| 152 | - ->with($this->isType('string')) |
|
| 153 | - ->will($this->returnValue($parserResultMock)); |
|
| 151 | + ->method('doFetch') |
|
| 152 | + ->with($this->isType('string')) |
|
| 153 | + ->will($this->returnValue($parserResultMock)); |
|
| 154 | 154 | |
| 155 | 155 | $cache->expects($this->never()) |
| 156 | - ->method('doSave'); |
|
| 156 | + ->method('doSave'); |
|
| 157 | 157 | |
| 158 | 158 | $query->setQueryCacheDriver($cache); |
| 159 | 159 | |