@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $this->addresses = $addresses; |
| 160 | 160 | |
| 161 | - $addresses->map(static function ($address) use ($self) { |
|
| 161 | + $addresses->map(static function($address) use ($self) { |
|
| 162 | 162 | $address->user = $self; |
| 163 | 163 | }); |
| 164 | 164 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | $this->pets = $pets; |
| 171 | 171 | |
| 172 | - $pets->map(static function ($pet) use ($self) { |
|
| 172 | + $pets->map(static function($pet) use ($self) { |
|
| 173 | 173 | $pet->owner = $self; |
| 174 | 174 | }); |
| 175 | 175 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | $updateSql = $this->schemaTool->getUpdateSchemaSql([$class]); |
| 34 | 34 | |
| 35 | - $updateSql = array_filter($updateSql, static function ($sql) { |
|
| 35 | + $updateSql = array_filter($updateSql, static function($sql) { |
|
| 36 | 36 | return strpos($sql, 'DBAL483') !== false; |
| 37 | 37 | }); |
| 38 | 38 | |
@@ -89,10 +89,10 @@ |
||
| 89 | 89 | $schemaDiff = $comparator->compare($fromSchema, $toSchema); |
| 90 | 90 | |
| 91 | 91 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
| 92 | - $sql = array_filter($sql, static function ($sql) { |
|
| 92 | + $sql = array_filter($sql, static function($sql) { |
|
| 93 | 93 | return strpos($sql, 'DROP') === false; |
| 94 | 94 | }); |
| 95 | 95 | |
| 96 | - self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql)); |
|
| 96 | + self::assertCount(0, $sql, 'SQL: '.implode(PHP_EOL, $sql)); |
|
| 97 | 97 | } |
| 98 | 98 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | parent::setUp(); |
| 22 | 22 | |
| 23 | 23 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') { |
| 24 | - $this->markTestSkipped('The ' . self::class . ' requires the use of postgresql.'); |
|
| 24 | + $this->markTestSkipped('The '.self::class.' requires the use of postgresql.'); |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $tool->createSchema($classes); |
| 133 | 133 | |
| 134 | 134 | $sql = $tool->getUpdateSchemaSql($classes); |
| 135 | - $sql = array_filter($sql, static function ($sql) { |
|
| 135 | + $sql = array_filter($sql, static function($sql) { |
|
| 136 | 136 | return strpos($sql, 'DROP SEQUENCE stonewood.') === 0; |
| 137 | 137 | }); |
| 138 | 138 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | parent::setUp(); |
| 17 | 17 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') { |
| 18 | - $this->markTestSkipped('The ' . self::class . ' requires the use of mysql.'); |
|
| 18 | + $this->markTestSkipped('The '.self::class.' requires the use of mysql.'); |
|
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | |
@@ -805,7 +805,7 @@ |
||
| 805 | 805 | $this->secondLevelCacheLogger->clearStats(); |
| 806 | 806 | $this->em->clear(); |
| 807 | 807 | |
| 808 | - $getHash = static function (AbstractQuery $query) { |
|
| 808 | + $getHash = static function(AbstractQuery $query) { |
|
| 809 | 809 | $method = new ReflectionMethod($query, 'getHash'); |
| 810 | 810 | $method->setAccessible(true); |
| 811 | 811 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use Doctrine\Tests\Models\CMS\CmsUser; |
| 13 | 13 | use Doctrine\Tests\OrmFunctionalTestCase; |
| 14 | 14 | |
| 15 | -require_once __DIR__ . '/../../TestInit.php'; |
|
| 15 | +require_once __DIR__.'/../../TestInit.php'; |
|
| 16 | 16 | |
| 17 | 17 | class CustomFunctionsTest extends OrmFunctionalTestCase |
| 18 | 18 | { |
@@ -32,10 +32,10 @@ discard block |
||
| 32 | 32 | $this->em->flush(); |
| 33 | 33 | |
| 34 | 34 | // Instead of defining the function with the class name, we use a callback |
| 35 | - $this->em->getConfiguration()->addCustomStringFunction('FOO', static function ($funcName) { |
|
| 35 | + $this->em->getConfiguration()->addCustomStringFunction('FOO', static function($funcName) { |
|
| 36 | 36 | return new NoOp($funcName); |
| 37 | 37 | }); |
| 38 | - $this->em->getConfiguration()->addCustomNumericFunction('BAR', static function ($funcName) { |
|
| 38 | + $this->em->getConfiguration()->addCustomNumericFunction('BAR', static function($funcName) { |
|
| 39 | 39 | return new NoOp($funcName); |
| 40 | 40 | }); |
| 41 | 41 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | { |
| 204 | 204 | $listener = new ListenerSecondLevelCacheTest( |
| 205 | 205 | [ |
| 206 | - Events::postFlush => static function () { |
|
| 206 | + Events::postFlush => static function() { |
|
| 207 | 207 | throw new RuntimeException('post flush failure'); |
| 208 | 208 | }, |
| 209 | 209 | ] |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | $listener = new ListenerSecondLevelCacheTest( |
| 237 | 237 | [ |
| 238 | - Events::postUpdate => static function () { |
|
| 238 | + Events::postUpdate => static function() { |
|
| 239 | 239 | throw new RuntimeException('post update failure'); |
| 240 | 240 | }, |
| 241 | 241 | ] |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | self::assertInstanceOf(State::class, $state); |
| 255 | 255 | self::assertEquals($stateName, $state->getName()); |
| 256 | 256 | |
| 257 | - $state->setName($stateName . uniqid()); |
|
| 257 | + $state->setName($stateName.uniqid()); |
|
| 258 | 258 | |
| 259 | 259 | $this->em->persist($state); |
| 260 | 260 | |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $this->em->clear(); |
| 282 | 282 | |
| 283 | 283 | $listener = new ListenerSecondLevelCacheTest([ |
| 284 | - Events::postRemove => static function () { |
|
| 284 | + Events::postRemove => static function() { |
|
| 285 | 285 | throw new RuntimeException('post remove failure'); |
| 286 | 286 | }, |
| 287 | 287 | ]); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | while ($worker->work()) { |
| 38 | 38 | if ($worker->returnCode() !== GEARMAN_SUCCESS) { |
| 39 | - echo 'return_code: ' . $worker->returnCode() . "\n"; |
|
| 39 | + echo 'return_code: '.$worker->returnCode()."\n"; |
|
| 40 | 40 | break; |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -61,14 +61,14 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | public function findWithLock($job) |
| 63 | 63 | { |
| 64 | - return $this->process($job, static function ($fixture, $em) { |
|
| 64 | + return $this->process($job, static function($fixture, $em) { |
|
| 65 | 65 | $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']); |
| 66 | 66 | }); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | public function dqlWithLock($job) |
| 70 | 70 | { |
| 71 | - return $this->process($job, static function ($fixture, $em) { |
|
| 71 | + return $this->process($job, static function($fixture, $em) { |
|
| 72 | 72 | /** @var Doctrine\ORM\Query $query */ |
| 73 | 73 | $query = $em->createQuery($fixture['dql']); |
| 74 | 74 | $query->setLockMode($fixture['lockMode']); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | public function lock($job) |
| 81 | 81 | { |
| 82 | - return $this->process($job, static function ($fixture, $em) { |
|
| 82 | + return $this->process($job, static function($fixture, $em) { |
|
| 83 | 83 | $entity = $em->find($fixture['entityName'], $fixture['entityId']); |
| 84 | 84 | $em->lock($entity, $fixture['lockMode']); |
| 85 | 85 | }); |
@@ -87,18 +87,18 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | protected function processWorkload($job) |
| 89 | 89 | { |
| 90 | - echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n"; |
|
| 90 | + echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n"; |
|
| 91 | 91 | |
| 92 | 92 | $workload = $job->workload(); |
| 93 | 93 | $workload = unserialize($workload); |
| 94 | 94 | |
| 95 | - if (! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
| 95 | + if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
| 96 | 96 | throw new InvalidArgumentException('Missing Database parameters'); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $this->em = $this->createEntityManager($workload['conn']); |
| 100 | 100 | |
| 101 | - if (! isset($workload['fixture'])) { |
|
| 101 | + if ( ! isset($workload['fixture'])) { |
|
| 102 | 102 | throw new InvalidArgumentException('Missing Fixture parameters'); |
| 103 | 103 | } |
| 104 | 104 | return $workload['fixture']; |
@@ -107,11 +107,11 @@ discard block |
||
| 107 | 107 | protected function createEntityManager($conn) |
| 108 | 108 | { |
| 109 | 109 | $config = new Configuration(); |
| 110 | - $config->setProxyDir(__DIR__ . '/../../../Proxies'); |
|
| 110 | + $config->setProxyDir(__DIR__.'/../../../Proxies'); |
|
| 111 | 111 | $config->setProxyNamespace('MyProject\Proxies'); |
| 112 | 112 | $config->setAutoGenerateProxyClasses(true); |
| 113 | 113 | |
| 114 | - $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']); |
|
| 114 | + $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']); |
|
| 115 | 115 | $config->setMetadataDriverImpl($annotDriver); |
| 116 | 116 | |
| 117 | 117 | $cache = new ArrayCache(); |