Failed Conditions
Pull Request — master (#7046)
by Gabriel
14:57
created
tests/Doctrine/Tests/Models/Cache/Attraction.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\Models\Cache;
6 6
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function addInfo(AttractionInfo $info)
91 91
     {
92
-        if (! $this->infos->contains($info)) {
92
+        if ( ! $this->infos->contains($info)) {
93 93
             $this->infos->add($info);
94 94
         }
95 95
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/ManyToManyPersister/ParentClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Models\ManyToManyPersister;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/CMS/CmsComment.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\Models\CMS;
6 6
 
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function __toString()
41 41
     {
42
-        return __CLASS__ . '[id=' . $this->id . ']';
42
+        return __CLASS__.'[id='.$this->id.']';
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $this->addToAssertionCount(1);
31 31
         } catch (QueryException $e) {
32 32
             if ($debug) {
33
-                echo $e->getTraceAsString() . PHP_EOL;
33
+                echo $e->getTraceAsString().PHP_EOL;
34 34
             }
35 35
 
36 36
             $this->fail($e->getMessage());
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
             $this->fail('No syntax errors were detected, when syntax errors were expected');
46 46
         } catch (QueryException $e) {
47 47
             if ($debug) {
48
-                echo $e->getMessage() . PHP_EOL;
49
-                echo $e->getTraceAsString() . PHP_EOL;
48
+                echo $e->getMessage().PHP_EOL;
49
+                echo $e->getTraceAsString().PHP_EOL;
50 50
             }
51 51
             $this->addToAssertionCount(1);
52 52
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'],
109 109
 
110 110
             /* Checks for invalid AbstractSchemaName */
111
-            ['SELECT u FROM UnknownClass u'],  // unknown
111
+            ['SELECT u FROM UnknownClass u'], // unknown
112 112
             ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash
113 113
             ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\)
114 114
             ['SELECT u FROM Unknown\Class\ u'], // unknown, syntactically bogus (trailing \)
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
      */
575 575
     public function testDQLKeywordInJoinIsAllowed()
576 576
     {
577
-        self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g');
577
+        self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g');
578 578
     }
579 579
 
580 580
     /**
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
      */
583 583
     public function testDQLKeywordInConditionIsAllowed()
584 584
     {
585
-        self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0');
585
+        self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0');
586 586
     }
587 587
 
588 588
     /* The exception is currently thrown in the SQLWalker, not earlier.
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
      */
688 688
     public function testNewLiteralExpression()
689 689
     {
690
-        self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
690
+        self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
691 691
     }
692 692
 
693 693
     /**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
      */
696 696
     public function testNewLiteralWithSubselectExpression()
697 697
     {
698
-        self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
698
+        self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
699 699
     }
700 700
 }
701 701
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/ParameterTypeInfererTest.php 1 patch
Spacing   +10 added lines, -10 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
 
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
     public function providerParameterTypeInferer()
16 16
     {
17 17
         $data = [
18
-            [1,                 Type::INTEGER],
19
-            ['bar',             PDO::PARAM_STR],
20
-            ['1',               PDO::PARAM_STR],
21
-            [new \DateTime,     Type::DATETIME],
18
+            [1, Type::INTEGER],
19
+            ['bar', PDO::PARAM_STR],
20
+            ['1', PDO::PARAM_STR],
21
+            [new \DateTime, Type::DATETIME],
22 22
             [new \DateInterval('P1D'), Type::DATEINTERVAL],
23
-            [[2],          Connection::PARAM_INT_ARRAY],
24
-            [['foo'],      Connection::PARAM_STR_ARRAY],
25
-            [['1','2'],    Connection::PARAM_STR_ARRAY],
26
-            [[],           Connection::PARAM_STR_ARRAY],
27
-            [true,              Type::BOOLEAN],
23
+            [[2], Connection::PARAM_INT_ARRAY],
24
+            [['foo'], Connection::PARAM_STR_ARRAY],
25
+            [['1', '2'], Connection::PARAM_STR_ARRAY],
26
+            [[], Connection::PARAM_STR_ARRAY],
27
+            [true, Type::BOOLEAN],
28 28
         ];
29 29
 
30 30
         if (PHP_VERSION_ID >= 50500) {
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/SequenceEmulatedIdentityStrategyTest.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\Functional;
6 6
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     {
18 18
         parent::setUp();
19 19
 
20
-        if (! $this->em->getConnection()->getDatabasePlatform()->usesSequenceEmulatedIdentityColumns()) {
20
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->usesSequenceEmulatedIdentityColumns()) {
21 21
             $this->markTestSkipped(
22 22
                 'This test is special to platforms emulating IDENTITY key generation strategy through sequences.'
23 23
             );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 1 patch
Spacing   +13 added lines, -13 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\Functional;
6 6
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $this->em->clear();
50 50
 
51
-        $query = $this->em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc');
51
+        $query = $this->em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc');
52 52
 
53 53
         $entities = $query->getResult();
54 54
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $this->em->clear();
65 65
 
66
-        $query = $this->em->createQuery('select p from ' . CompanyEmployee::class . ' p');
66
+        $query = $this->em->createQuery('select p from '.CompanyEmployee::class.' p');
67 67
 
68 68
         $entities = $query->getResult();
69 69
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->em->clear();
84 84
 
85
-        $query = $this->em->createQuery('update ' . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
85
+        $query = $this->em->createQuery('update '.CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
86 86
 
87 87
         $query->setParameter(1, 'NewName', 'string');
88 88
         $query->setParameter(2, 'NewDepartment');
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         self::assertEquals(1, $numUpdated);
95 95
 
96
-        $query = $this->em->createQuery('delete from ' . CompanyPerson::class . ' p');
96
+        $query = $this->em->createQuery('delete from '.CompanyPerson::class.' p');
97 97
 
98 98
         $numDeleted = $query->execute();
99 99
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $this->em->flush();
169 169
         $this->em->clear();
170 170
 
171
-        $query = $this->em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\'');
171
+        $query = $this->em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\'');
172 172
 
173 173
         $result = $query->getResult();
174 174
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         $this->em->clear();
202 202
 
203
-        $query = $this->em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1');
203
+        $query = $this->em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1');
204 204
 
205 205
         $query->setParameter(1, 'Roman');
206 206
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $this->em->flush();
267 267
         $this->em->clear();
268 268
 
269
-        $q = $this->em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1');
269
+        $q = $this->em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1');
270 270
 
271 271
         $q->setParameter(1, $event1->getId());
272 272
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 
278 278
         $this->em->clear();
279 279
 
280
-        $q = $this->em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1');
280
+        $q = $this->em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1');
281 281
 
282 282
         $q->setParameter(1, $org->getId());
283 283
 
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function testBulkUpdateIssueDDC368()
300 300
     {
301
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
301
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1')
302 302
                   ->execute();
303 303
 
304
-        $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
304
+        $result = $this->em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1')
305 305
                             ->getResult();
306 306
 
307 307
         self::assertGreaterThan(0, $result);
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public function testBulkUpdateNonScalarParameterDDC1341()
314 314
     {
315
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
315
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1')
316 316
                   ->setParameter(0, new \DateTime())
317 317
                   ->setParameter(1, 'IT')
318 318
                   ->execute();
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         $this->em->flush();
371 371
         $this->em->clear();
372 372
 
373
-        $dqlManager = $this->em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1')
373
+        $dqlManager = $this->em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1')
374 374
                                 ->setParameter(1, $person->getId())
375 375
                                 ->getSingleResult();
376 376
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1695Test.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\Functional\Ticket;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function testIssue()
24 24
     {
25
-        $dql = 'SELECT n.smallText, n.publishDate FROM ' . __NAMESPACE__ . '\\DDC1695News n';
25
+        $dql = 'SELECT n.smallText, n.publishDate FROM '.__NAMESPACE__.'\\DDC1695News n';
26 26
         $sql = $this->em->createQuery($dql)->getSQL();
27 27
 
28 28
         self::assertEquals(
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.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\Functional\Ticket;
6 6
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $this->em->clear();
46 46
 
47 47
         $query = $this->em->createQuery(
48
-            'SELECT x, y, z FROM Doctrine\Tests\ORM\Functional\Ticket\DDC279EntityX x ' .
48
+            'SELECT x, y, z FROM Doctrine\Tests\ORM\Functional\Ticket\DDC279EntityX x '.
49 49
             'INNER JOIN x.y y INNER JOIN y.z z WHERE x.id = ?1'
50 50
         )->setParameter(1, $x->id);
51 51
 
Please login to merge, or discard this patch.