Completed
Push — master ( f4c848...d31188 )
by Jonathan
24s queued 17s
created
tests/Doctrine/Tests/ORM/Query/QueryTest.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -88,18 +88,18 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $q  = $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a');
90 90
         $q2 = $q->expireQueryCache(true)
91
-          ->setQueryCacheLifetime(3600)
92
-          ->setQueryCacheDriver(null)
93
-          ->expireResultCache(true)
94
-          ->setHint('foo', 'bar')
95
-          ->setHint('bar', 'baz')
96
-          ->setParameter(1, 'bar')
97
-          ->setParameters(new ArrayCollection([new Parameter(2, 'baz')]))
98
-          ->setResultCacheDriver(null)
99
-          ->setResultCacheId('foo')
100
-          ->setDQL('foo')
101
-          ->setFirstResult(10)
102
-          ->setMaxResults(10);
91
+            ->setQueryCacheLifetime(3600)
92
+            ->setQueryCacheDriver(null)
93
+            ->expireResultCache(true)
94
+            ->setHint('foo', 'bar')
95
+            ->setHint('bar', 'baz')
96
+            ->setParameter(1, 'bar')
97
+            ->setParameters(new ArrayCollection([new Parameter(2, 'baz')]))
98
+            ->setResultCacheDriver(null)
99
+            ->setResultCacheId('foo')
100
+            ->setDQL('foo')
101
+            ->setFirstResult(10)
102
+            ->setMaxResults(10);
103 103
 
104 104
         self::assertSame($q2, $q);
105 105
     }
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache());
257 257
 
258 258
         $query = $this->em->createQuery('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u')
259
-                          ->useResultCache(true);
259
+                            ->useResultCache(true);
260 260
 
261 261
         /** @var DriverConnectionMock $driverConnectionMock */
262 262
         $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->useResultCache(true);
383 383
         $query->setResultCacheProfile();
384 384
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1914,10 +1914,10 @@  discard block
 block discarded – undo
1914 1914
         $rsm->setDiscriminatorColumn('c', 'c_discr');
1915 1915
 
1916 1916
         $resultSet = [
1917
-              [
1918
-                  'c__id'   => '1',
1919
-                  'c_discr' => 'fix',
1920
-              ],
1917
+                [
1918
+                    'c__id'   => '1',
1919
+                    'c_discr' => 'fix',
1920
+                ],
1921 1921
         ];
1922 1922
 
1923 1923
         $stmt     = new HydratorMockStatement($resultSet);
@@ -1946,12 +1946,12 @@  discard block
 block discarded – undo
1946 1946
         $rsm->setDiscriminatorColumn('e', 'e_discr');
1947 1947
 
1948 1948
         $resultSet = [
1949
-              [
1950
-                  'c__id'   => '1',
1951
-                  'c_discr' => 'fix',
1952
-                  'e__id'   => '1',
1953
-                  'e__name' => 'Fabio B. Silva',
1954
-              ],
1949
+                [
1950
+                    'c__id'   => '1',
1951
+                    'c_discr' => 'fix',
1952
+                    'e__id'   => '1',
1953
+                    'e__name' => 'Fabio B. Silva',
1954
+                ],
1955 1955
         ];
1956 1956
 
1957 1957
         $stmt     = new HydratorMockStatement($resultSet);
@@ -1976,11 +1976,11 @@  discard block
 block discarded – undo
1976 1976
         $rsm->setDiscriminatorColumn('p', 'discr');
1977 1977
 
1978 1978
         $resultSet = [
1979
-              [
1980
-                  'p__id'   => '1',
1981
-                  'p__name' => 'Fabio B. Silva',
1982
-                  'discr'   => 'subworker',
1983
-              ],
1979
+                [
1980
+                    'p__id'   => '1',
1981
+                    'p__name' => 'Fabio B. Silva',
1982
+                    'discr'   => 'subworker',
1983
+                ],
1984 1984
         ];
1985 1985
 
1986 1986
         $stmt     = new HydratorMockStatement($resultSet);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
         ];
1024 1024
 
1025 1025
         $proxyInstance = (new LazyLoadingGhostFactory(new Configuration()))
1026
-            ->createProxy(ECommerceShipping::class, function () {
1026
+            ->createProxy(ECommerceShipping::class, function() {
1027 1027
                 self::fail('Proxy is not supposed to be lazy-loaded');
1028 1028
             });
1029 1029
 
@@ -1074,7 +1074,7 @@  discard block
 block discarded – undo
1074 1074
         ];
1075 1075
 
1076 1076
         $proxyInstance = (new LazyLoadingGhostFactory(new Configuration()))
1077
-            ->createProxy(ECommerceShipping::class, function () {
1077
+            ->createProxy(ECommerceShipping::class, function() {
1078 1078
                 self::fail('Proxy is not supposed to be lazy-loaded');
1079 1079
             });
1080 1080
 
Please login to merge, or discard this patch.
Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@
 block discarded – undo
86 86
         $this->em                  = $this->getTestEntityManager();
87 87
         $this->region              = $this->createRegion();
88 88
         $this->collectionPersister = $this->getMockBuilder(CollectionPersister::class)
89
-                                           ->setMethods($this->collectionPersisterMockMethods)
90
-                                           ->getMock();
89
+                                            ->setMethods($this->collectionPersisterMockMethods)
90
+                                            ->getMock();
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@
 block discarded – undo
103 103
         $this->em              = $this->getTestEntityManager();
104 104
         $this->region          = $this->createRegion();
105 105
         $this->entityPersister = $this->getMockBuilder(EntityPersister::class)
106
-                                       ->setMethods($this->entityPersisterMockMethods)
107
-                                       ->getMock();
106
+                                        ->setMethods($this->entityPersisterMockMethods)
107
+                                        ->getMock();
108 108
     }
109 109
 
110 110
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/OrderedCollectionTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,8 @@
 block discarded – undo
104 104
         $routeId = $this->createPersistedRouteWithLegs();
105 105
 
106 106
         $route = $this->em->createQuery('SELECT r, l FROM Doctrine\Tests\Models\Routing\RoutingRoute r JOIN r.legs l WHERE r.id = ?1')
107
-                           ->setParameter(1, $routeId)
108
-                           ->getSingleResult();
107
+                            ->setParameter(1, $routeId)
108
+                            ->getSingleResult();
109 109
 
110 110
         self::assertCount(2, $route->legs);
111 111
         self::assertEquals('Berlin', $route->legs[0]->fromLocation->getName());
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -361,9 +361,9 @@  discard block
 block discarded – undo
361 361
         self::assertCount(2, $user->phonenumbers);
362 362
         $dql  = 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1';
363 363
         $user = $this->em->createQuery($dql)
364
-                          ->setParameter(1, $user->id)
365
-                          ->setHint(Query::HINT_REFRESH, true)
366
-                          ->getSingleResult();
364
+                            ->setParameter(1, $user->id)
365
+                            ->setHint(Query::HINT_REFRESH, true)
366
+                            ->getSingleResult();
367 367
 
368 368
         self::assertCount(1, $user->phonenumbers);
369 369
     }
@@ -398,8 +398,8 @@  discard block
 block discarded – undo
398 398
 
399 399
         $dql  = 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1';
400 400
         $user = $this->em->createQuery($dql)
401
-                          ->setParameter(1, $userId)
402
-                          ->getSingleResult();
401
+                            ->setParameter(1, $userId)
402
+                            ->getSingleResult();
403 403
 
404 404
         self::assertCount(1, $user->phonenumbers);
405 405
     }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $user->username = 'gblanco';
186 186
         $user->status   = 'developer';
187 187
 
188
-        for ($i=0; $i<3; ++$i) {
188
+        for ($i = 0; $i < 3; ++$i) {
189 189
             $phone              = new CmsPhonenumber();
190 190
             $phone->phonenumber = 100 + $i;
191 191
             $user->addPhonenumber($phone);
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         $user->username = 'gblanco';
414 414
         $user->status   = 'developer';
415 415
 
416
-        for ($i=0; $i<3; ++$i) {
416
+        for ($i = 0; $i < 3; ++$i) {
417 417
             $phone              = new CmsPhonenumber();
418 418
             $phone->phonenumber = 100 + $i;
419 419
             $user->addPhonenumber($phone);
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         $user->username = 'gblanco';
454 454
         $user->status   = 'developer';
455 455
 
456
-        for ($i=0; $i<3; ++$i) {
456
+        for ($i = 0; $i < 3; ++$i) {
457 457
             $phone              = new CmsPhonenumber();
458 458
             $phone->phonenumber = 100 + $i;
459 459
             $user->addPhonenumber($phone);
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
         $user->username = 'gblanco';
495 495
         $user->status   = 'developer';
496 496
 
497
-        for ($i=0; $i<3; ++$i) {
497
+        for ($i = 0; $i < 3; ++$i) {
498 498
             $phone              = new CmsPhonenumber();
499 499
             $phone->phonenumber = 100 + $i;
500 500
             $user->addPhonenumber($phone);
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 
642 642
         $user->setAddress($address);
643 643
 
644
-        $this->em->transactional(function ($em) use ($user) {
644
+        $this->em->transactional(function($em) use ($user) {
645 645
             $em->persist($user);
646 646
         });
647 647
         $this->em->clear();
@@ -682,12 +682,12 @@  discard block
 block discarded – undo
682 682
         $this->em->persist($user);
683 683
         $this->em->flush();
684 684
 
685
-        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id));
685
+        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id));
686 686
 
687 687
         $address->user = null;
688 688
         $this->em->flush();
689 689
 
690
-        self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id));
690
+        self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id));
691 691
     }
692 692
 
693 693
     /**
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
 
882 882
         self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, 'It IS a proxy, ...');
883 883
         self::assertTrue($fetchedUser->isProxyInitialized(), '...but its initialized!');
884
-        self::assertEquals($qc+2, $this->getCurrentQueryCount());
884
+        self::assertEquals($qc + 2, $this->getCurrentQueryCount());
885 885
     }
886 886
 
887 887
     /**
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
 
943 943
         $this->expectException(ORMInvalidArgumentException::class);
944 944
         $this->expectExceptionMessage(
945
-            'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' .
945
+            'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '.
946 946
             '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.'
947 947
         );
948 948
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -223,13 +223,13 @@
 block discarded – undo
223 223
 
224 224
         $q  = $this->em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm);
225 225
         $q2 = $q->setSQL('foo')
226
-          ->setResultSetMapping($rsm)
227
-          ->expireResultCache(true)
228
-          ->setHint('foo', 'bar')
229
-          ->setParameter(1, 'foo')
230
-          ->setParameters($parameters)
231
-          ->setResultCacheDriver(null)
232
-          ->setResultCacheLifetime(3500);
226
+            ->setResultSetMapping($rsm)
227
+            ->expireResultCache(true)
228
+            ->setHint('foo', 'bar')
229
+            ->setParameter(1, 'foo')
230
+            ->setParameters($parameters)
231
+            ->setResultCacheDriver(null)
232
+            ->setResultCacheLifetime(3500);
233 233
 
234 234
         self::assertSame($q, $q2);
235 235
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,37 +36,37 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
 
38 38
         $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author';
39 39
         $this->em->createQuery($dql)
40
-                  ->setParameter('author', $user)
41
-                  ->getResult();
40
+                    ->setParameter('author', $user)
41
+                    ->getResult();
42 42
 
43 43
         $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author AND a.user = :author';
44 44
         $this->em->createQuery($dql)
45
-                  ->setParameter('author', $user)
46
-                  ->getResult();
45
+                    ->setParameter('author', $user)
46
+                    ->getResult();
47 47
 
48 48
         $dql      = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author';
49 49
         $farticle = $this->em->createQuery($dql)
50
-                  ->setParameter('author', $user)
51
-                  ->setParameter('topic', 'This is John Galt speaking!')
52
-                  ->getSingleResult();
50
+                    ->setParameter('author', $user)
51
+                    ->setParameter('topic', 'This is John Galt speaking!')
52
+                    ->getSingleResult();
53 53
 
54 54
         self::assertSame($article, $farticle);
55 55
     }
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 
73 73
         $dql      = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3';
74 74
         $farticle = $this->em->createQuery($dql)
75
-                  ->setParameter(1, 'This is John Galt speaking!')
76
-                  ->setParameter(2, $user)
77
-                  ->setParameter(3, $user)
78
-                  ->getSingleResult();
75
+                    ->setParameter(1, 'This is John Galt speaking!')
76
+                    ->setParameter(2, $user)
77
+                    ->setParameter(3, $user)
78
+                    ->getSingleResult();
79 79
 
80 80
         self::assertSame($article, $farticle);
81 81
     }
Please login to merge, or discard this patch.