Failed Conditions
Pull Request — master (#7046)
by Gabriel
12:07
created
tests/Doctrine/Tests/TestUtil.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests;
6 6
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $realDbParams = self::getParamsForMainConnection();
93 93
 
94
-        if (! self::$initialized) {
94
+        if ( ! self::$initialized) {
95 95
             $tmpDbParams = self::getParamsForTemporaryConnection();
96 96
 
97 97
             $realConn = DriverManager::getConnection($realDbParams);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         $this->entityManager->getConnection()->setDatabasePlatform(new PostgreSqlPlatform);
89 89
 
90 90
         $query      = $this->entityManager->createQuery(
91
-           'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC'
91
+            'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC'
92 92
         );
93 93
         $limitQuery = clone $query;
94 94
         $limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, LimitSubqueryOutputWalker::class);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Query;
6 6
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
             $query->free();
66 66
         } catch (\Exception $e) {
67
-            $this->fail($e->getMessage() . "\n" . $e->getTraceAsString());
67
+            $this->fail($e->getMessage()."\n".$e->getTraceAsString());
68 68
         }
69 69
 
70 70
         self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
@@ -1618,7 +1618,7 @@  discard block
 block discarded – undo
1618 1618
     public function testAliasDoesNotExceedPlatformDefinedLength()
1619 1619
     {
1620 1620
         $this->assertSqlGeneration(
1621
-            'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m',
1621
+            'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m',
1622 1622
             'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0'
1623 1623
         );
1624 1624
     }
@@ -1651,12 +1651,12 @@  discard block
 block discarded – undo
1651 1651
     public function testSelectWithArithmeticExpressionBeforeField()
1652 1652
     {
1653 1653
         $this->assertSqlGeneration(
1654
-            'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1654
+            'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e',
1655 1655
             'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0'
1656 1656
         );
1657 1657
 
1658 1658
         $this->assertSqlGeneration(
1659
-            'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1659
+            'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e',
1660 1660
             'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0'
1661 1661
         );
1662 1662
     }
@@ -2333,8 +2333,8 @@  discard block
 block discarded – undo
2333 2333
     public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator)
2334 2334
     {
2335 2335
         $this->assertSqlGeneration(
2336
-            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0',
2337
-            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0'
2336
+            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0',
2337
+            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0'
2338 2338
         );
2339 2339
     }
2340 2340
 
@@ -2353,7 +2353,7 @@  discard block
 block discarded – undo
2353 2353
 
2354 2354
     public function getSql(SqlWalker $sqlWalker)
2355 2355
     {
2356
-        return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')';
2356
+        return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')';
2357 2357
     }
2358 2358
 
2359 2359
     public function parse(Parser $parser)
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
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Query;
6 6
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      */
314 314
     public function testGetParameterTypeJuggling() : void
315 315
     {
316
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id = ?0');
316
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id = ?0');
317 317
 
318 318
         $query->setParameter(0, 0);
319 319
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      */
328 328
     public function testSetParameterWithNameZeroIsNotOverridden() : void
329 329
     {
330
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
330
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
331 331
 
332 332
         $query->setParameter(0, 0);
333 333
         $query->setParameter('name', 'Doctrine');
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function testSetParameterWithNameZeroDoesNotOverrideAnotherParameter() : void
344 344
     {
345
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
345
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
346 346
 
347 347
         $query->setParameter('name', 'Doctrine');
348 348
         $query->setParameter(0, 0);
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public function testSetParameterWithTypeJugglingWorks() : void
359 359
     {
360
-        $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
360
+        $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
361 361
 
362 362
         $query->setParameter('0', 1);
363 363
         $query->setParameter('name', 'Doctrine');
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     {
378 378
         $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache());
379 379
 
380
-        $query = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u');
380
+        $query = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u');
381 381
         $query->useResultCache(true);
382 382
         $query->setResultCacheProfile();
383 383
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php 1 patch
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.
tests/Doctrine/Tests/ORM/UnitOfWorkTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             'empty string, single field'     => [$emptyString, ''],
505 505
             'non-empty string, single field' => [$nonEmptyString, $nonEmptyString->id],
506 506
             'empty strings, two fields'      => [$emptyStrings, ' '],
507
-            'non-empty strings, two fields'  => [$nonEmptyStrings, $nonEmptyStrings->id1 . ' ' . $nonEmptyStrings->id2],
507
+            'non-empty strings, two fields'  => [$nonEmptyStrings, $nonEmptyStrings->id1.' '.$nonEmptyStrings->id2],
508 508
             'boolean true'                   => [$booleanTrue, '1'],
509 509
             'boolean false'                  => [$booleanFalse, ''],
510 510
         ];
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/EntityManagerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     public function testCreateQueryBuilderAliasValid()
109 109
     {
110 110
         $q  = $this->em->createQueryBuilder()
111
-             ->select('u')->from(CmsUser::class, 'u');
111
+                ->select('u')->from(CmsUser::class, 'u');
112 112
         $q2 = clone $q;
113 113
 
114 114
         self::assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u', $q->getQuery()->getDql());
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.