Failed Conditions
Push — master ( a3e53b...559253 )
by Guilherme
14:58
created
lib/Doctrine/ORM/Query/AST/Node.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             foreach ($props as $name => $prop) {
52 52
                 $ident += 4;
53 53
                 $str   .= str_repeat(' ', $ident) . '"' . $name . '": '
54
-                      . $this->dump($prop) . ',' . PHP_EOL;
54
+                        . $this->dump($prop) . ',' . PHP_EOL;
55 55
                 $ident -= 4;
56 56
             }
57 57
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
             foreach ($obj as $k => $v) {
65 65
                 $str .= PHP_EOL . str_repeat(' ', $ident) . '"'
66
-                      . $k . '" => ' . $this->dump($v) . ',';
66
+                        . $k . '" => ' . $this->dump($v) . ',';
67 67
                 $some = true;
68 68
             }
69 69
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -54,32 +54,32 @@
 block discarded – undo
54 54
         $str = '';
55 55
 
56 56
         if ($obj instanceof Node) {
57
-            $str  .= get_class($obj) . '(' . PHP_EOL;
57
+            $str  .= get_class($obj).'('.PHP_EOL;
58 58
             $props = get_object_vars($obj);
59 59
 
60 60
             foreach ($props as $name => $prop) {
61 61
                 $ident += 4;
62
-                $str   .= str_repeat(' ', $ident) . '"' . $name . '": '
63
-                      . $this->dump($prop) . ',' . PHP_EOL;
62
+                $str   .= str_repeat(' ', $ident).'"'.$name.'": '
63
+                      . $this->dump($prop).','.PHP_EOL;
64 64
                 $ident -= 4;
65 65
             }
66 66
 
67
-            $str .= str_repeat(' ', $ident) . ')';
67
+            $str .= str_repeat(' ', $ident).')';
68 68
         } elseif (is_array($obj)) {
69 69
             $ident += 4;
70 70
             $str   .= 'array(';
71 71
             $some   = false;
72 72
 
73 73
             foreach ($obj as $k => $v) {
74
-                $str .= PHP_EOL . str_repeat(' ', $ident) . '"'
75
-                      . $k . '" => ' . $this->dump($v) . ',';
74
+                $str .= PHP_EOL.str_repeat(' ', $ident).'"'
75
+                      . $k.'" => '.$this->dump($v).',';
76 76
                 $some = true;
77 77
             }
78 78
 
79 79
             $ident -= 4;
80
-            $str   .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')';
80
+            $str   .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '').')';
81 81
         } elseif (is_object($obj)) {
82
-            $str .= 'instanceof(' . get_class($obj) . ')';
82
+            $str .= 'instanceof('.get_class($obj).')';
83 83
         } else {
84 84
             $str .= var_export($obj, true);
85 85
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
     protected function configure()
22 22
     {
23 23
         $this->setName('orm:info')
24
-             ->setDescription('Show basic information about all mapped entities')
25
-             ->setHelp(<<<'EOT'
24
+                ->setDescription('Show basic information about all mapped entities')
25
+                ->setHelp(<<<'EOT'
26 26
 The <info>%command.name%</info> shows basic information about which
27 27
 entities exist and possibly if their mapping information contains errors or
28 28
 not.
29 29
 EOT
30
-             );
30
+                );
31 31
     }
32 32
 
33 33
     /**
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         $entityManager = $this->getHelper('em')->getEntityManager();
42 42
 
43 43
         $entityClassNames = $entityManager->getConfiguration()
44
-                                          ->getMetadataDriverImpl()
45
-                                          ->getAllClassNames();
44
+                                            ->getMetadataDriverImpl()
45
+                                            ->getAllClassNames();
46 46
 
47 47
         if (! $entityClassNames) {
48 48
             $ui->caution(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                                           ->getMetadataDriverImpl()
48 48
                                           ->getAllClassNames();
49 49
 
50
-        if (! $entityClassNames) {
50
+        if ( ! $entityClassNames) {
51 51
             $ui->caution(
52 52
                 [
53 53
                     'You do not have any mapped Doctrine ORM entities according to the current configuration.',
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC698Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
     {
27 27
         $qb = $this->em->createQueryBuilder();
28 28
         $qb->select('p', 'r')
29
-           ->from(__NAMESPACE__ . '\DDC698Privilege', 'p')
30
-           ->leftJoin('p.roles', 'r');
29
+            ->from(__NAMESPACE__ . '\DDC698Privilege', 'p')
30
+            ->leftJoin('p.roles', 'r');
31 31
 
32 32
         self::assertSQLEquals(
33 33
             'SELECT t0."privilegeID" AS c0, t0."name" AS c1, t1."roleID" AS c2, t1."name" AS c3, t1."shortName" AS c4 FROM "Privileges" t0 LEFT JOIN "RolePrivileges" t2 ON t0."privilegeID" = t2."privilegeID" LEFT JOIN "Roles" t1 ON t1."roleID" = t2."roleID"',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     {
28 28
         $qb = $this->em->createQueryBuilder();
29 29
         $qb->select('p', 'r')
30
-           ->from(__NAMESPACE__ . '\DDC698Privilege', 'p')
30
+           ->from(__NAMESPACE__.'\DDC698Privilege', 'p')
31 31
            ->leftJoin('p.roles', 'r');
32 32
 
33 33
         self::assertSQLEquals(
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
@@ -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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
      */
338 338
     public function testGetParameterTypeJuggling() : void
339 339
     {
340
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id = ?0');
340
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id = ?0');
341 341
 
342 342
         $query->setParameter(0, 0);
343 343
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function testSetParameterWithNameZeroIsNotOverridden() : void
353 353
     {
354
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
354
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
355 355
 
356 356
         $query->setParameter(0, 0);
357 357
         $query->setParameter('name', 'Doctrine');
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
      */
367 367
     public function testSetParameterWithNameZeroDoesNotOverrideAnotherParameter() : void
368 368
     {
369
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
369
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
370 370
 
371 371
         $query->setParameter('name', 'Doctrine');
372 372
         $query->setParameter(0, 0);
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
      */
382 382
     public function testSetParameterWithTypeJugglingWorks() : void
383 383
     {
384
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
384
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
385 385
 
386 386
         $query->setParameter('0', 1);
387 387
         $query->setParameter('name', 'Doctrine');
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
     {
402 402
         $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache());
403 403
 
404
-        $query = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u');
404
+        $query = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u');
405 405
         $query->useResultCache(true);
406 406
         $query->setResultCacheProfile();
407 407
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
             ->expects(self::never())
420 420
             ->method('getSingleIdentifierValue');
421 421
 
422
-        $query = $this->em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d WHERE d.datetime = :value');
422
+        $query = $this->em->createQuery('SELECT d FROM '.DateTimeModel::class.' d WHERE d.datetime = :value');
423 423
 
424 424
         $query->setParameter('value', new DateTime(), Type::DATETIME);
425 425
 
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
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $user->username = 'gblanco';
187 187
         $user->status   = 'developer';
188 188
 
189
-        for ($i=0; $i<3; ++$i) {
189
+        for ($i = 0; $i < 3; ++$i) {
190 190
             $phone              = new CmsPhonenumber();
191 191
             $phone->phonenumber = 100 + $i;
192 192
             $user->addPhonenumber($phone);
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         $user->username = 'gblanco';
415 415
         $user->status   = 'developer';
416 416
 
417
-        for ($i=0; $i<3; ++$i) {
417
+        for ($i = 0; $i < 3; ++$i) {
418 418
             $phone              = new CmsPhonenumber();
419 419
             $phone->phonenumber = 100 + $i;
420 420
             $user->addPhonenumber($phone);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         $user->username = 'gblanco';
455 455
         $user->status   = 'developer';
456 456
 
457
-        for ($i=0; $i<3; ++$i) {
457
+        for ($i = 0; $i < 3; ++$i) {
458 458
             $phone              = new CmsPhonenumber();
459 459
             $phone->phonenumber = 100 + $i;
460 460
             $user->addPhonenumber($phone);
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
         $user->username = 'gblanco';
496 496
         $user->status   = 'developer';
497 497
 
498
-        for ($i=0; $i<3; ++$i) {
498
+        for ($i = 0; $i < 3; ++$i) {
499 499
             $phone              = new CmsPhonenumber();
500 500
             $phone->phonenumber = 100 + $i;
501 501
             $user->addPhonenumber($phone);
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 
643 643
         $user->setAddress($address);
644 644
 
645
-        $this->em->transactional(static function ($em) use ($user) {
645
+        $this->em->transactional(static function($em) use ($user) {
646 646
             $em->persist($user);
647 647
         });
648 648
         $this->em->clear();
@@ -683,12 +683,12 @@  discard block
 block discarded – undo
683 683
         $this->em->persist($user);
684 684
         $this->em->flush();
685 685
 
686
-        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id));
686
+        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id));
687 687
 
688 688
         $address->user = null;
689 689
         $this->em->flush();
690 690
 
691
-        self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id));
691
+        self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id));
692 692
     }
693 693
 
694 694
     /**
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
 
883 883
         self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, 'It IS a proxy, ...');
884 884
         self::assertTrue($fetchedUser->isProxyInitialized(), '...but its initialized!');
885
-        self::assertEquals($qc+2, $this->getCurrentQueryCount());
885
+        self::assertEquals($qc + 2, $this->getCurrentQueryCount());
886 886
     }
887 887
 
888 888
     /**
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 
944 944
         $this->expectException(ORMInvalidArgumentException::class);
945 945
         $this->expectExceptionMessage(
946
-            'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' .
946
+            'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '.
947 947
             '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.'
948 948
         );
949 949
 
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.