@@ -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\Performance\Hydration; |
| 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\Performance\Hydration; |
| 6 | 6 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $user = new CMS\CmsUser(); |
| 42 | 42 | |
| 43 | 43 | $user->status = 'developer'; |
| 44 | - $user->username = 'jwage' . $i; |
|
| 44 | + $user->username = 'jwage'.$i; |
|
| 45 | 45 | $user->name = 'Jonathan'; |
| 46 | 46 | |
| 47 | 47 | $this->entityManager->persist($user); |
@@ -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\Performance\LazyLoading; |
| 6 | 6 | |
@@ -213,8 +213,8 @@ |
||
| 213 | 213 | $this->metadataCache = []; |
| 214 | 214 | |
| 215 | 215 | $this->em |
| 216 | - ->getEventManager() |
|
| 217 | - ->removeEventListener([Events::onClear], $this); |
|
| 216 | + ->getEventManager() |
|
| 217 | + ->removeEventListener([Events::onClear], $this); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /** |
@@ -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\ORM\Internal\Hydration; |
| 6 | 6 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | { |
| 149 | 149 | $row = $this->stmt->fetch(FetchMode::ASSOCIATIVE); |
| 150 | 150 | |
| 151 | - if (! $row) { |
|
| 151 | + if ( ! $row) { |
|
| 152 | 152 | $this->cleanup(); |
| 153 | 153 | |
| 154 | 154 | return false; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | : $value; |
| 292 | 292 | |
| 293 | 293 | if ($cacheKeyInfo['isIdentifier'] && $value !== null) { |
| 294 | - $id[$dqlAlias] .= '|' . $value; |
|
| 294 | + $id[$dqlAlias] .= '|'.$value; |
|
| 295 | 295 | $nonemptyComponents[$dqlAlias] = true; |
| 296 | 296 | } |
| 297 | 297 | break; |
@@ -327,10 +327,10 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | // WARNING: BC break! We know this is the desired behavior to type convert values, but this |
| 329 | 329 | // erroneous behavior exists since 2.0 and we're forced to keep compatibility. |
| 330 | - if (! isset($cacheKeyInfo['isScalar'])) { |
|
| 330 | + if ( ! isset($cacheKeyInfo['isScalar'])) { |
|
| 331 | 331 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
| 332 | 332 | $type = $cacheKeyInfo['type']; |
| 333 | - $fieldName = $dqlAlias . '_' . $fieldName; |
|
| 333 | + $fieldName = $dqlAlias.'_'.$fieldName; |
|
| 334 | 334 | $value = $type |
| 335 | 335 | ? $type->convertToPHPValue($value, $this->platform) |
| 336 | 336 | : $value; |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | */ |
| 437 | 437 | protected function getClassMetadata($className) |
| 438 | 438 | { |
| 439 | - if (! isset($this->metadataCache[$className])) { |
|
| 439 | + if ( ! isset($this->metadataCache[$className])) { |
|
| 440 | 440 | $this->metadataCache[$className] = $this->em->getClassMetadata($className); |
| 441 | 441 | } |
| 442 | 442 | |
@@ -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; |
| 6 | 6 | |
@@ -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\Persisters; |
| 6 | 6 | |
@@ -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; |
| 6 | 6 | |
@@ -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 | |
@@ -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 | |
@@ -36,37 +36,37 @@ |
||
| 36 | 36 | $dql = 'SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u'; |
| 37 | 37 | |
| 38 | 38 | $users = $this->em->createQuery($dql) |
| 39 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 40 | - ->getResult(); |
|
| 39 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 40 | + ->getResult(); |
|
| 41 | 41 | |
| 42 | 42 | $c = $this->getCurrentQueryCount(); |
| 43 | 43 | $users = $this->em->createQuery($dql) |
| 44 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 45 | - ->getResult(); |
|
| 44 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 45 | + ->getResult(); |
|
| 46 | 46 | |
| 47 | 47 | self::assertEquals($c, $this->getCurrentQueryCount(), 'Should not execute query. Its cached!'); |
| 48 | 48 | |
| 49 | 49 | $users = $this->em->createQuery($dql) |
| 50 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 51 | - ->getArrayResult(); |
|
| 50 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 51 | + ->getArrayResult(); |
|
| 52 | 52 | |
| 53 | 53 | self::assertEquals($c + 1, $this->getCurrentQueryCount(), 'Hydration is part of cache key.'); |
| 54 | 54 | |
| 55 | 55 | $users = $this->em->createQuery($dql) |
| 56 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 57 | - ->getArrayResult(); |
|
| 56 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) |
|
| 57 | + ->getArrayResult(); |
|
| 58 | 58 | |
| 59 | 59 | self::assertEquals($c + 1, $this->getCurrentQueryCount(), 'Hydration now cached'); |
| 60 | 60 | |
| 61 | 61 | $users = $this->em->createQuery($dql) |
| 62 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
| 63 | - ->getArrayResult(); |
|
| 62 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
| 63 | + ->getArrayResult(); |
|
| 64 | 64 | |
| 65 | 65 | self::assertTrue($cache->contains('cachekey'), 'Explicit cache key'); |
| 66 | 66 | |
| 67 | 67 | $users = $this->em->createQuery($dql) |
| 68 | - ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
| 69 | - ->getArrayResult(); |
|
| 68 | + ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache)) |
|
| 69 | + ->getArrayResult(); |
|
| 70 | 70 | self::assertEquals($c + 2, $this->getCurrentQueryCount(), 'Hydration now cached'); |
| 71 | 71 | } |
| 72 | 72 | |