@@ -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 | |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | $worker->addFunction("dqlWithLock", [$lockAgent, "dqlWithLock"]); |
| 27 | 27 | $worker->addFunction('lock', [$lockAgent, 'lock']); |
| 28 | 28 | |
| 29 | - while($worker->work()) { |
|
| 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(); |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | $this->expectExceptionMessage('The optimistic lock on an entity failed.'); |
| 213 | 213 | |
| 214 | 214 | $this->em->createQuery($dql) |
| 215 | - ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC) |
|
| 216 | - ->getSQL(); |
|
| 215 | + ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC) |
|
| 216 | + ->getSQL(); |
|
| 217 | 217 | } |
| 218 | 218 | } |
@@ -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.'); |
@@ -224,13 +224,13 @@ |
||
| 224 | 224 | |
| 225 | 225 | $q = $this->em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm); |
| 226 | 226 | $q2 = $q->setSQL('foo') |
| 227 | - ->setResultSetMapping($rsm) |
|
| 228 | - ->expireResultCache(true) |
|
| 229 | - ->setHint('foo', 'bar') |
|
| 230 | - ->setParameter(1, 'foo') |
|
| 231 | - ->setParameters($parameters) |
|
| 232 | - ->setResultCacheDriver(null) |
|
| 233 | - ->setResultCacheLifetime(3500); |
|
| 227 | + ->setResultSetMapping($rsm) |
|
| 228 | + ->expireResultCache(true) |
|
| 229 | + ->setHint('foo', 'bar') |
|
| 230 | + ->setParameter(1, 'foo') |
|
| 231 | + ->setParameters($parameters) |
|
| 232 | + ->setResultCacheDriver(null) |
|
| 233 | + ->setResultCacheLifetime(3500); |
|
| 234 | 234 | |
| 235 | 235 | self::assertSame($q, $q2); |
| 236 | 236 | } |
@@ -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 | |
@@ -436,8 +436,8 @@ discard block |
||
| 436 | 436 | |
| 437 | 437 | self::assertCount(1, $result); |
| 438 | 438 | self::assertInstanceOf(CmsAddress::class, $result[0]); |
| 439 | - self::assertEquals($addr->id, $result[0]->id); |
|
| 440 | - self::assertEquals($addr->city, $result[0]->city); |
|
| 439 | + self::assertEquals($addr->id, $result[0]->id); |
|
| 440 | + self::assertEquals($addr->city, $result[0]->city); |
|
| 441 | 441 | self::assertEquals($addr->country, $result[0]->country); |
| 442 | 442 | } |
| 443 | 443 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | |
| 455 | 455 | $email = new CmsEmail(); |
| 456 | 456 | |
| 457 | - $email->email = '[email protected]'; |
|
| 457 | + $email->email = '[email protected]'; |
|
| 458 | 458 | |
| 459 | 459 | $user->setEmail($email); |
| 460 | 460 | |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | $repository = $this->em->getRepository(CmsUser::class); |
| 606 | 606 | $result = $repository |
| 607 | 607 | ->createNativeNamedQuery('fetchUserPhonenumberCount') |
| 608 | - ->setParameter(1, ['test','FabioBatSilva'])->getResult(); |
|
| 608 | + ->setParameter(1, ['test', 'FabioBatSilva'])->getResult(); |
|
| 609 | 609 | |
| 610 | 610 | self::assertCount(2, $result); |
| 611 | 611 | self::assertInternalType('array', $result[0]); |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | |
| 833 | 833 | $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u'); |
| 834 | 834 | |
| 835 | - self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string)$rsm); |
|
| 835 | + self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string) $rsm); |
|
| 836 | 836 | } |
| 837 | 837 | |
| 838 | 838 | /** |
@@ -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 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | try { |
| 79 | 79 | // exception depending on the underlying Database Driver |
| 80 | 80 | $this->em->flush(); |
| 81 | - } catch(\Exception $e) { |
|
| 81 | + } catch (\Exception $e) { |
|
| 82 | 82 | $exceptionThrown = true; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | $this->putTripAroundEurope(); |
| 113 | 113 | |
| 114 | 114 | $dql = 'SELECT t, p, c ' |
| 115 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
| 116 | - . 'INNER JOIN t.pois p ' |
|
| 117 | - . 'INNER JOIN p.country c' |
|
| 115 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
| 116 | + . 'INNER JOIN t.pois p ' |
|
| 117 | + . 'INNER JOIN p.country c' |
|
| 118 | 118 | ; |
| 119 | 119 | |
| 120 | 120 | $tours = $this->em->createQuery($dql)->getResult(); |
@@ -134,9 +134,9 @@ discard block |
||
| 134 | 134 | $this->putTripAroundEurope(); |
| 135 | 135 | |
| 136 | 136 | $dql = 'SELECT t ' |
| 137 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
| 138 | - . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
| 139 | - . 'WHERE p MEMBER OF t.pois' |
|
| 137 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
| 138 | + . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
| 139 | + . 'WHERE p MEMBER OF t.pois' |
|
| 140 | 140 | ; |
| 141 | 141 | |
| 142 | 142 | $query = $this->em->createQuery($dql); |
@@ -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 | use Doctrine\Common\Util\Debug; |
@@ -3,10 +3,8 @@ |
||
| 3 | 3 | declare(strict_types=1); |
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
| 6 | -use Doctrine\Common\Util\Debug; |
|
| 7 | 6 | use Doctrine\ORM\EntityManager\MissingIdentifierField; |
| 8 | 7 | use Doctrine\ORM\EntityManager\UnrecognizedIdentifierFields; |
| 9 | -use Doctrine\ORM\ORMException; |
|
| 10 | 8 | use Doctrine\ORM\Query\QueryException; |
| 11 | 9 | use Doctrine\Tests\Models\Navigation\NavCountry; |
| 12 | 10 | use Doctrine\Tests\Models\Navigation\NavPhotos; |
@@ -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\Ticket; |
| 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\Ticket; |
| 6 | 6 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | $this->em->getClassMetadata(DDC381Entity::class), |
| 19 | 19 | ] |
| 20 | 20 | ); |
| 21 | - } catch(\Exception $e) { |
|
| 21 | + } catch (\Exception $e) { |
|
| 22 | 22 | |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -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 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $this |
| 32 | 32 | ->em |
| 33 | 33 | ->createQuery( |
| 34 | - 'SELECT f, b FROM ' . __NAMESPACE__ . '\DDC3042Foo f JOIN ' . __NAMESPACE__ . '\DDC3042Bar b WITH 1 = 1' |
|
| 34 | + 'SELECT f, b FROM '.__NAMESPACE__.'\DDC3042Foo f JOIN '.__NAMESPACE__.'\DDC3042Bar b WITH 1 = 1' |
|
| 35 | 35 | ) |
| 36 | 36 | ->getSQL() |
| 37 | 37 | ); |
@@ -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 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $this->em->getClassMetadata(DDC2759MetadataCategory::class), |
| 28 | 28 | ] |
| 29 | 29 | ); |
| 30 | - } catch(\Exception $e) { |
|
| 30 | + } catch (\Exception $e) { |
|
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | 33 | |