Failed Conditions
Pull Request — master (#7046)
by Gabriel
14:57
created
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.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->em->flush();
35 35
         $this->em->clear();
36 36
 
37
-        $q      = $this->em->createQuery('select u,i from ' . __NAMESPACE__ . '\\DDC512Customer u left join u.item i');
37
+        $q      = $this->em->createQuery('select u,i from '.__NAMESPACE__.'\\DDC512Customer u left join u.item i');
38 38
         $result = $q->getResult();
39 39
 
40 40
         self::assertCount(2, $result);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.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
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->em->flush();
57 57
         $this->em->clear();
58 58
 
59
-        $dql     = 'SELECT a, b, ba, c FROM ' . __NAMESPACE__ . '\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title';
59
+        $dql     = 'SELECT a, b, ba, c FROM '.__NAMESPACE__.'\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title';
60 60
         $results = $this->em->createQuery($dql)->getResult();
61 61
 
62 62
         self::assertEquals($a1->id, $results[0]->id);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php 1 patch
Spacing   +4 added lines, -4 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
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         parent::setUp();
21 21
 
22
-        if (! Type::hasType('ddc2984_domain_user_id')) {
22
+        if ( ! Type::hasType('ddc2984_domain_user_id')) {
23 23
             Type::addType(
24 24
                 'ddc2984_domain_user_id',
25 25
                 DDC2984UserIdCustomDbalType::class
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $this->em->persist($user);
46 46
         $this->em->flush();
47 47
 
48
-        $repository = $this->em->getRepository(__NAMESPACE__ . '\DDC2984User');
48
+        $repository = $this->em->getRepository(__NAMESPACE__.'\DDC2984User');
49 49
 
50 50
         $sameUser = $repository->find(new DDC2984DomainUserId('unique_id_within_a_vo'));
51 51
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             return $value;
192 192
         }
193 193
 
194
-        if (! $value instanceof DDC2984DomainUserId) {
194
+        if ( ! $value instanceof DDC2984DomainUserId) {
195 195
             throw ConversionException::conversionFailed($value, $this->getName());
196 196
         }
197 197
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.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
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $this->em->flush();
39 39
         $this->em->clear();
40 40
 
41
-        $history = $this->em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1')
41
+        $history = $this->em->createQuery('SELECT h FROM '.__NAMESPACE__.'\\DDC1250ClientHistory h WHERE h.id = ?1')
42 42
                   ->setParameter(1, $c2->id)->getSingleResult();
43 43
 
44 44
         self::assertInstanceOf(DDC1250ClientHistory::class, $history);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2224Test.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 e FROM ' . __NAMESPACE__ . '\DDC2224Entity e WHERE e.field = :field';
25
+        $dql   = 'SELECT e FROM '.__NAMESPACE__.'\DDC2224Entity e WHERE e.field = :field';
26 26
         $query = $this->em->createQuery($dql);
27 27
         $query->setQueryCacheDriver(new ArrayCache());
28 28
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1335Test.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\Functional\Ticket;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function testDql()
30 30
     {
31
-        $dql    = 'SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.id';
31
+        $dql    = 'SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.id';
32 32
         $query  = $this->em->createQuery($dql);
33 33
         $result = $query->getResult();
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         self::assertArrayHasKey(2, $result);
38 38
         self::assertArrayHasKey(3, $result);
39 39
 
40
-        $dql    = 'SELECT u, p FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id';
40
+        $dql    = 'SELECT u, p FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id';
41 41
         $query  = $this->em->createQuery($dql);
42 42
         $result = $query->getResult();
43 43
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         self::assertArrayHasKey(1, $result);
80 80
         self::assertArrayHasKey(2, $result);
81 81
         self::assertArrayHasKey(3, $result);
82
-        self::assertEquals('SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.id', $dql);
82
+        self::assertEquals('SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.id', $dql);
83 83
     }
84 84
 
85 85
     public function testIndexByUnique()
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         self::assertArrayHasKey('[email protected]', $result);
95 95
         self::assertArrayHasKey('[email protected]', $result);
96 96
         self::assertArrayHasKey('[email protected]', $result);
97
-        self::assertEquals('SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email', $dql);
97
+        self::assertEquals('SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email', $dql);
98 98
     }
99 99
 
100 100
     public function testIndexWithJoin()
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
         self::assertArrayHasKey(8, $result['[email protected]']->phones->toArray());
129 129
         self::assertArrayHasKey(9, $result['[email protected]']->phones->toArray());
130 130
 
131
-        self::assertEquals('SELECT u, p FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id', $dql);
131
+        self::assertEquals('SELECT u, p FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id', $dql);
132 132
     }
133 133
 
134 134
     private function loadFixture()
135 135
     {
136
-        $p1 = ['11 xxxx-xxxx','11 yyyy-yyyy','11 zzzz-zzzz'];
137
-        $p2 = ['22 xxxx-xxxx','22 yyyy-yyyy','22 zzzz-zzzz'];
138
-        $p3 = ['33 xxxx-xxxx','33 yyyy-yyyy','33 zzzz-zzzz'];
136
+        $p1 = ['11 xxxx-xxxx', '11 yyyy-yyyy', '11 zzzz-zzzz'];
137
+        $p2 = ['22 xxxx-xxxx', '22 yyyy-yyyy', '22 zzzz-zzzz'];
138
+        $p3 = ['33 xxxx-xxxx', '33 yyyy-yyyy', '33 zzzz-zzzz'];
139 139
 
140 140
         $u1 = new DDC1335User('[email protected]', 'Foo', $p1);
141 141
         $u2 = new DDC1335User('[email protected]', 'Bar', $p2);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
 
151 151
         $dql = 'DELETE Doctrine\Tests\Models\DDC117\DDC117Reference r WHERE r.source = ?1 AND r.target = ?2';
152 152
         $this->em->createQuery($dql)
153
-                  ->setParameter(1, $this->article1->id())
154
-                  ->setParameter(2, $this->article2->id())
155
-                  ->execute();
153
+                    ->setParameter(1, $this->article1->id())
154
+                    ->setParameter(2, $this->article2->id())
155
+                    ->execute();
156 156
 
157 157
         self::assertNull($this->em->find(DDC117Reference::class, $idCriteria));
158 158
     }
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
 
203 203
         $dql      = 'SELECT t, a FROM Doctrine\Tests\Models\DDC117\DDC117Translation t JOIN t.article a WHERE t.article = ?1 AND t.language = ?2';
204 204
         $dqlTrans = $this->em->createQuery($dql)
205
-                              ->setParameter(1, $this->article1->id())
206
-                              ->setParameter(2, 'en')
207
-                              ->getSingleResult();
205
+                                ->setParameter(1, $this->article1->id())
206
+                                ->setParameter(2, 'en')
207
+                                ->getSingleResult();
208 208
 
209 209
         self::assertInstanceOf(DDC117Translation::class, $this->translation);
210 210
     }
@@ -369,11 +369,11 @@  discard block
 block discarded – undo
369 369
         $this->em->clear();
370 370
 
371 371
         $dql   = 'SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t ' .
372
-               'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2';
372
+                'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2';
373 373
         $trans = $this->em->createQuery($dql)
374
-                           ->setParameter(1, $this->translation->getArticleId())
375
-                           ->setParameter(2, $this->translation->getLanguage())
376
-                           ->getSingleResult();
374
+                            ->setParameter(1, $this->translation->getArticleId())
375
+                            ->setParameter(2, $this->translation->getLanguage())
376
+                            ->getSingleResult();
377 377
 
378 378
         self::assertInstanceOf(DDC117Translation::class, $trans);
379 379
         self::assertContainsOnly(DDC117Editor::class, $trans->reviewedByEditors);
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\Functional\Ticket;
6 6
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $this->em->clear();
68 68
 
69
-        $dql    = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE r.source = ?1';
69
+        $dql    = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE r.source = ?1';
70 70
         $dqlRef = $this->em->createQuery($dql)->setParameter(1, 1)->getSingleResult();
71 71
 
72 72
         self::assertInstanceOf(DDC117Reference::class, $mapRef);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         $this->em->clear();
78 78
 
79
-        $dql    = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1';
79
+        $dql    = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1';
80 80
         $dqlRef = $this->em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult();
81 81
 
82 82
         self::assertInstanceOf(DDC117Reference::class, $dqlRef);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         self::assertInstanceOf(DDC117Article::class, $dqlRef->source());
85 85
         self::assertSame($dqlRef, $this->em->find(DDC117Reference::class, $idCriteria));
86 86
 
87
-        $dql    = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1';
87
+        $dql    = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1';
88 88
         $dqlRef = $this->em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult();
89 89
 
90 90
         $this->em->contains($dqlRef);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function testOneToOneCascadePersist()
270 270
     {
271
-        if (! $this->em->getConnection()->getDatabasePlatform()->prefersSequences()) {
271
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->prefersSequences()) {
272 272
             $this->markTestSkipped('Test only works with databases that prefer sequences as ID strategy.');
273 273
         }
274 274
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
         $this->em->clear();
370 370
 
371
-        $dql   = 'SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t ' .
371
+        $dql   = 'SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t '.
372 372
                'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2';
373 373
         $trans = $this->em->createQuery($dql)
374 374
                            ->setParameter(1, $this->translation->getArticleId())
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2660Test.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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         for ($i = 0; $i < 5; $i++) {
35 35
             $product  = new DDC2660Product();
36 36
             $customer = new DDC2660Customer();
37
-            $order    = new DDC2660CustomerOrder($product, $customer, 'name' . $i);
37
+            $order    = new DDC2660CustomerOrder($product, $customer, 'name'.$i);
38 38
 
39 39
             $this->em->persist($product);
40 40
             $this->em->persist($customer);
Please login to merge, or discard this patch.