Passed
Pull Request — master (#7214)
by
unknown
13:16
created
tests/Doctrine/Tests/ORM/Functional/Ticket/GH2947Test.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/QueryTest.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.