| @@ -49,10 +49,10 @@ discard block | ||
| 49 | 49 | private function createQuery() | 
| 50 | 50 |      { | 
| 51 | 51 | return $this->em->createQueryBuilder() | 
| 52 | -                         ->select('car') | |
| 53 | - ->from(GH2947Car::class, 'car') | |
| 54 | - ->getQuery() | |
| 55 | - ->enableResultCache(3600, 'foo-cache-id'); | |
| 52 | +                            ->select('car') | |
| 53 | + ->from(GH2947Car::class, 'car') | |
| 54 | + ->getQuery() | |
| 55 | + ->enableResultCache(3600, 'foo-cache-id'); | |
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | 58 | private function createData() | 
| @@ -65,13 +65,13 @@ discard block | ||
| 65 | 65 | private function updateData() | 
| 66 | 66 |      { | 
| 67 | 67 | $this->em->createQueryBuilder() | 
| 68 | - ->update(GH2947Car::class, 'car') | |
| 69 | -                  ->set('car.brand', ':newBrand') | |
| 70 | -                  ->where('car.brand = :oldBrand') | |
| 71 | -                  ->setParameter('newBrand', 'Dacia') | |
| 72 | -                  ->setParameter('oldBrand', 'BMW') | |
| 73 | - ->getQuery() | |
| 74 | - ->execute(); | |
| 68 | + ->update(GH2947Car::class, 'car') | |
| 69 | +                    ->set('car.brand', ':newBrand') | |
| 70 | +                    ->where('car.brand = :oldBrand') | |
| 71 | +                    ->setParameter('newBrand', 'Dacia') | |
| 72 | +                    ->setParameter('oldBrand', 'BMW') | |
| 73 | + ->getQuery() | |
| 74 | + ->execute(); | |
| 75 | 75 | } | 
| 76 | 76 | } | 
| 77 | 77 | |
| @@ -89,18 +89,18 @@ discard block | ||
| 89 | 89 |      { | 
| 90 | 90 |          $q  = $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a'); | 
| 91 | 91 | $q2 = $q->expireQueryCache(true) | 
| 92 | - ->setQueryCacheLifetime(3600) | |
| 93 | - ->setQueryCacheDriver(null) | |
| 94 | - ->expireResultCache(true) | |
| 95 | -          ->setHint('foo', 'bar') | |
| 96 | -          ->setHint('bar', 'baz') | |
| 97 | - ->setParameter(1, 'bar') | |
| 98 | - ->setParameters(new ArrayCollection([new Parameter(2, 'baz')])) | |
| 99 | - ->setResultCacheDriver(null) | |
| 100 | -          ->setResultCacheId('foo') | |
| 101 | -          ->setDQL('foo') | |
| 102 | - ->setFirstResult(10) | |
| 103 | - ->setMaxResults(10); | |
| 92 | + ->setQueryCacheLifetime(3600) | |
| 93 | + ->setQueryCacheDriver(null) | |
| 94 | + ->expireResultCache(true) | |
| 95 | +            ->setHint('foo', 'bar') | |
| 96 | +            ->setHint('bar', 'baz') | |
| 97 | + ->setParameter(1, 'bar') | |
| 98 | + ->setParameters(new ArrayCollection([new Parameter(2, 'baz')])) | |
| 99 | + ->setResultCacheDriver(null) | |
| 100 | +            ->setResultCacheId('foo') | |
| 101 | +            ->setDQL('foo') | |
| 102 | + ->setFirstResult(10) | |
| 103 | + ->setMaxResults(10); | |
| 104 | 104 | |
| 105 | 105 | self::assertSame($q2, $q); | 
| 106 | 106 | } | 
| @@ -257,7 +257,7 @@ discard block | ||
| 257 | 257 | $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache()); | 
| 258 | 258 | |
| 259 | 259 |          $query = $this->em->createQuery('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u') | 
| 260 | - ->enableResultCache(); | |
| 260 | + ->enableResultCache(); | |
| 261 | 261 | |
| 262 | 262 | /** @var DriverConnectionMock $driverConnectionMock */ | 
| 263 | 263 | $driverConnectionMock = $this->em->getConnection() | 
| @@ -314,7 +314,7 @@ discard block | ||
| 314 | 314 | */ | 
| 315 | 315 | public function testGetParameterTypeJuggling() : void | 
| 316 | 316 |      { | 
| 317 | -        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id = ?0'); | |
| 317 | +        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id = ?0'); | |
| 318 | 318 | |
| 319 | 319 | $query->setParameter(0, 0); | 
| 320 | 320 | |
| @@ -328,7 +328,7 @@ discard block | ||
| 328 | 328 | */ | 
| 329 | 329 | public function testSetParameterWithNameZeroIsNotOverridden() : void | 
| 330 | 330 |      { | 
| 331 | -        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name'); | |
| 331 | +        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name'); | |
| 332 | 332 | |
| 333 | 333 | $query->setParameter(0, 0); | 
| 334 | 334 |          $query->setParameter('name', 'Doctrine'); | 
| @@ -343,7 +343,7 @@ discard block | ||
| 343 | 343 | */ | 
| 344 | 344 | public function testSetParameterWithNameZeroDoesNotOverrideAnotherParameter() : void | 
| 345 | 345 |      { | 
| 346 | -        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name'); | |
| 346 | +        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name'); | |
| 347 | 347 | |
| 348 | 348 |          $query->setParameter('name', 'Doctrine'); | 
| 349 | 349 | $query->setParameter(0, 0); | 
| @@ -358,7 +358,7 @@ discard block | ||
| 358 | 358 | */ | 
| 359 | 359 | public function testSetParameterWithTypeJugglingWorks() : void | 
| 360 | 360 |      { | 
| 361 | -        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name'); | |
| 361 | +        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name'); | |
| 362 | 362 | |
| 363 | 363 |          $query->setParameter('0', 1); | 
| 364 | 364 |          $query->setParameter('name', 'Doctrine'); | 
| @@ -378,7 +378,7 @@ discard block | ||
| 378 | 378 |      { | 
| 379 | 379 | $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache()); | 
| 380 | 380 | |
| 381 | -        $query = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u'); | |
| 381 | +        $query = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u'); | |
| 382 | 382 | $query->enableResultCache(); | 
| 383 | 383 | $query->setResultCacheProfile(); | 
| 384 | 384 | |