Completed
Pull Request — master (#7046)
by Gabriel
13:08
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2214Test.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
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $related = $this
50 50
             ->em
51
-            ->createQuery('SELECT b FROM ' . __NAMESPACE__ . '\DDC2214Bar b WHERE b.id IN(:ids)')
51
+            ->createQuery('SELECT b FROM '.__NAMESPACE__.'\DDC2214Bar b WHERE b.id IN(:ids)')
52 52
             ->setParameter('ids', [$bar])
53 53
             ->getResult();
54 54
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2602Test.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
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $entity = $event->getEntity();
136 136
 
137
-        if (! ($entity instanceof DDC2602Biography)) {
137
+        if ( ! ($entity instanceof DDC2602Biography)) {
138 138
             return;
139 139
         }
140 140
 
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
         foreach ($content as $selection) {
153 153
             $field      = $result[$selection->field];
154 154
             $choiceList = $selection->choiceList;
155
-            $fieldSelection     = new DDC2602FieldSelection();
155
+            $fieldSelection = new DDC2602FieldSelection();
156 156
 
157 157
             $fieldSelection->field      = $field;
158
-            $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) {
158
+            $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) {
159 159
                 return in_array($choice->id, $choiceList, true);
160 160
             });
161 161
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function testIndexByJoin()
75 75
     {
76 76
         $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' .
77
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
77
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
78 78
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
79 79
 
80 80
         self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books.
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
     public function testIndexByToOneJoinSilentlyIgnored()
99 99
     {
100 100
         $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
101
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
101
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
102 102
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
103 103
 
104 104
         self::assertInstanceOf(DDC618Book::class, $result[0]);
105 105
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
106 106
 
107 107
         $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
108
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
108
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
109 109
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
110 110
 
111 111
         self::assertEquals('Alice', $result[0]['author']['name']);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function testCombineIndexBy()
118 118
     {
119 119
         $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' .
120
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
120
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
121 121
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
122 122
 
123 123
         self::assertArrayHasKey(11, $result); // Alice
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 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
 
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function testIndexByJoin()
75 75
     {
76
-        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' .
76
+        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '.
77 77
                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
78 78
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
79 79
 
80 80
         self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books.
81 81
         self::assertEquals('Alice', $result[0]->name);
82
-        self::assertTrue( isset($result[0]->books['In Wonderland'] ), 'Indexing by title should have books by title.');
83
-        self::assertTrue( isset($result[0]->books['Reloaded'] ), 'Indexing by title should have books by title.');
84
-        self::assertTrue( isset($result[0]->books['Test'] ), 'Indexing by title should have books by title.');
82
+        self::assertTrue(isset($result[0]->books['In Wonderland']), 'Indexing by title should have books by title.');
83
+        self::assertTrue(isset($result[0]->books['Reloaded']), 'Indexing by title should have books by title.');
84
+        self::assertTrue(isset($result[0]->books['Test']), 'Indexing by title should have books by title.');
85 85
 
86 86
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
87 87
 
88 88
         self::assertCount(3, $result[0]['books']); // Alice, Joe doesn't appear because he has no books.
89 89
         self::assertEquals('Alice', $result[0]['name']);
90
-        self::assertTrue( isset($result[0]['books']['In Wonderland'] ), 'Indexing by title should have books by title.');
91
-        self::assertTrue( isset($result[0]['books']['Reloaded'] ), 'Indexing by title should have books by title.');
92
-        self::assertTrue( isset($result[0]['books']['Test'] ), 'Indexing by title should have books by title.');
90
+        self::assertTrue(isset($result[0]['books']['In Wonderland']), 'Indexing by title should have books by title.');
91
+        self::assertTrue(isset($result[0]['books']['Reloaded']), 'Indexing by title should have books by title.');
92
+        self::assertTrue(isset($result[0]['books']['Test']), 'Indexing by title should have books by title.');
93 93
     }
94 94
 
95 95
     /**
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function testIndexByToOneJoinSilentlyIgnored()
99 99
     {
100
-        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
100
+        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
101 101
                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
102 102
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
103 103
 
104 104
         self::assertInstanceOf(DDC618Book::class, $result[0]);
105 105
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
106 106
 
107
-        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
107
+        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
108 108
                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
109 109
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
110 110
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function testCombineIndexBy()
118 118
     {
119
-        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' .
119
+        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '.
120 120
                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
121 121
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
122 122
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 
125 125
         self::assertCount(3, $result[11]->books); // Alice, Joe doesn't appear because he has no books.
126 126
         self::assertEquals('Alice', $result[11]->name);
127
-        self::assertTrue( isset($result[11]->books['In Wonderland'] ), 'Indexing by title should have books by title.');
128
-        self::assertTrue( isset($result[11]->books['Reloaded'] ), 'Indexing by title should have books by title.');
129
-        self::assertTrue( isset($result[11]->books['Test'] ), 'Indexing by title should have books by title.');
127
+        self::assertTrue(isset($result[11]->books['In Wonderland']), 'Indexing by title should have books by title.');
128
+        self::assertTrue(isset($result[11]->books['Reloaded']), 'Indexing by title should have books by title.');
129
+        self::assertTrue(isset($result[11]->books['Test']), 'Indexing by title should have books by title.');
130 130
     }
131 131
 }
132 132
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.php 1 patch
Spacing   +5 added lines, -5 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
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
         $this->em->clear();
36 36
 
37 37
         $query = $this->em->createQuery(
38
-            'SELECT b, h' .
39
-            ' FROM Doctrine\Tests\ORM\Functional\Ticket\DDC3330_Building b' .
40
-            ' LEFT JOIN b.halls h' .
38
+            'SELECT b, h'.
39
+            ' FROM Doctrine\Tests\ORM\Functional\Ticket\DDC3330_Building b'.
40
+            ' LEFT JOIN b.halls h'.
41 41
             ' ORDER BY b.id ASC, h.name DESC'
42 42
         )
43 43
         ->setMaxResults(3);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         for ($i = 0; $i < 10; $i++) {
58 58
             $hall = new DDC3330_Hall();
59
-            $hall->name = 'HALL-' . $i;
59
+            $hall->name = 'HALL-'.$i;
60 60
             $building->addHall($hall);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function addGroup(Group $child)
96 96
     {
97
-        if (! $this->children->contains($child)) {
97
+        if ( ! $this->children->contains($child)) {
98 98
             $this->children->add($child);
99 99
             $child->addGroup($this);
100 100
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function addChannel(Channel $child)
109 109
     {
110
-        if (! $this->channels->contains($child)) {
110
+        if ( ! $this->channels->contains($child)) {
111 111
             $this->channels->add($child);
112 112
         }
113 113
     }
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/GH6682Test.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\Test\ORM\Functional\Ticket;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.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
-        $q = $this->em->createQuery('select u, c.data from ' . __NAMESPACE__ . '\\DDC493Distributor u JOIN u.contact c');
25
+        $q = $this->em->createQuery('select u, c.data from '.__NAMESPACE__.'\\DDC493Distributor u JOIN u.contact c');
26 26
 
27 27
         self::assertSQLEquals(
28 28
             'SELECT t0."id" AS c0, t1."data" AS c1, t0."discr" AS c2, t0."contact" AS c3 FROM "DDC493Distributor" t2 INNER JOIN "DDC493Customer" t0 ON t2."id" = t0."id" INNER JOIN "DDC493Contact" t1 ON t0."contact" = t1."id"',
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.