Failed Conditions
Pull Request — develop (#6888)
by Michael
61:51
created
Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,6 @@
 block discarded – undo
6 6
 
7 7
 use Doctrine\ORM\Mapping\FetchMode;
8 8
 use Doctrine\Tests\Models\ECommerce\ECommerceProduct;
9
-use Doctrine\ORM\Mapping\AssociationMapping;
10
-use Doctrine\ORM\Mapping\ClassMetadata;
11 9
 
12 10
 /**
13 11
  * Tests a self referential many-to-many association mapping (from a model to the same model, without inheritance).
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,6 @@
 block discarded – undo
7 7
 use Doctrine\ORM\Mapping\FetchMode;
8 8
 use Doctrine\Tests\Models\ECommerce\ECommerceCart;
9 9
 use Doctrine\Tests\Models\ECommerce\ECommerceProduct;
10
-use Doctrine\ORM\Mapping\AssociationMapping;
11
-use Doctrine\ORM\Mapping\ClassMetadata;
12 10
 
13 11
 /**
14 12
  * Tests a unidirectional many-to-many association mapping (without inheritance).
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -100,6 +100,9 @@  discard block
 block discarded – undo
100 100
         $this->listeners[] = $listener;
101 101
     }
102 102
 
103
+    /**
104
+     * @param string $propName
105
+     */
103 106
     protected function onPropertyChanged($propName, $oldValue, $newValue) {
104 107
         if ($this->listeners) {
105 108
             foreach ($this->listeners as $listener) {
@@ -132,6 +135,9 @@  discard block
 block discarded – undo
132 135
         return $this->name;
133 136
     }
134 137
 
138
+    /**
139
+     * @param string $name
140
+     */
135 141
     public function setName($name) {
136 142
         $this->onPropertyChanged('name', $this->name, $name);
137 143
         $this->name = $name;
@@ -165,6 +171,9 @@  discard block
 block discarded – undo
165 171
         return $this->name;
166 172
     }
167 173
 
174
+    /**
175
+     * @param string $name
176
+     */
168 177
     public function setName($name) {
169 178
         $this->onPropertyChanged('name', $this->name, $name);
170 179
         $this->name = $name;
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
7
-use Doctrine\ORM\Mapping\AssociationMapping;
8
-use Doctrine\ORM\Mapping\ClassMetadata;
9 7
 use Doctrine\ORM\Mapping\FetchMode;
10 8
 use Doctrine\Tests\Models\ECommerce\ECommerceCategory;
11 9
 use Doctrine\Tests\OrmFunctionalTestCase;
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
7
-use Doctrine\ORM\Mapping\AssociationMapping;
8
-use Doctrine\ORM\Mapping\ClassMetadata;
9 7
 use Doctrine\ORM\Mapping\FetchMode;
10 8
 use Doctrine\ORM\Query;
11 9
 use Doctrine\Tests\Models\ECommerce\ECommerceProduct;
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PaginationTest.php 2 patches
Doc Comments   +24 added lines patch added patch discarded remove patch
@@ -120,6 +120,10 @@  discard block
 block discarded – undo
120 120
         self::assertCount(3, $paginator->getIterator());
121 121
     }
122 122
 
123
+    /**
124
+     * @param string $baseDql
125
+     * @param string $checkField
126
+     */
123 127
     private function iterateWithOrderAsc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
124 128
     {
125 129
         // Ascending
@@ -134,6 +138,10 @@  discard block
 block discarded – undo
134 138
         self::assertEquals($checkField . "0", $result[0]->$checkField);
135 139
     }
136 140
 
141
+    /**
142
+     * @param string $baseDql
143
+     * @param string $checkField
144
+     */
137 145
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
138 146
     {
139 147
         // Ascending
@@ -150,6 +158,10 @@  discard block
 block discarded – undo
150 158
         self::assertEquals($checkField . "0", $result[0]->$checkField);
151 159
     }
152 160
 
161
+    /**
162
+     * @param string $baseDql
163
+     * @param string $checkField
164
+     */
153 165
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
154 166
     {
155 167
         // Ascending
@@ -166,6 +178,10 @@  discard block
 block discarded – undo
166 178
         self::assertEquals($checkField . "3", $result[0]->$checkField);
167 179
     }
168 180
 
181
+    /**
182
+     * @param string $baseDql
183
+     * @param string $checkField
184
+     */
169 185
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
170 186
     {
171 187
         $dql = "$baseDql DESC";
@@ -179,6 +195,10 @@  discard block
 block discarded – undo
179 195
         self::assertEquals($checkField . "8", $result[0]->$checkField);
180 196
     }
181 197
 
198
+    /**
199
+     * @param string $baseDql
200
+     * @param string $checkField
201
+     */
182 202
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
183 203
     {
184 204
         $dql = "$baseDql DESC";
@@ -194,6 +214,10 @@  discard block
 block discarded – undo
194 214
         self::assertEquals($checkField . "8", $result[0]->$checkField);
195 215
     }
196 216
 
217
+    /**
218
+     * @param string $baseDql
219
+     * @param string $checkField
220
+     */
197 221
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
198 222
     {
199 223
         $dql = "$baseDql DESC";
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $iter = $paginator->getIterator();
132 132
         self::assertCount(9, $iter);
133 133
         $result = iterator_to_array($iter);
134
-        self::assertEquals($checkField . "0", $result[0]->$checkField);
134
+        self::assertEquals($checkField."0", $result[0]->$checkField);
135 135
     }
136 136
 
137 137
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $iter = $paginator->getIterator();
148 148
         self::assertCount(3, $iter);
149 149
         $result = iterator_to_array($iter);
150
-        self::assertEquals($checkField . "0", $result[0]->$checkField);
150
+        self::assertEquals($checkField."0", $result[0]->$checkField);
151 151
     }
152 152
 
153 153
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $iter = $paginator->getIterator();
164 164
         self::assertCount(3, $iter);
165 165
         $result = iterator_to_array($iter);
166
-        self::assertEquals($checkField . "3", $result[0]->$checkField);
166
+        self::assertEquals($checkField."3", $result[0]->$checkField);
167 167
     }
168 168
 
169 169
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $iter = $paginator->getIterator();
177 177
         self::assertCount(9, $iter);
178 178
         $result = iterator_to_array($iter);
179
-        self::assertEquals($checkField . "8", $result[0]->$checkField);
179
+        self::assertEquals($checkField."8", $result[0]->$checkField);
180 180
     }
181 181
 
182 182
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $iter = $paginator->getIterator();
192 192
         self::assertCount(3, $iter);
193 193
         $result = iterator_to_array($iter);
194
-        self::assertEquals($checkField . "8", $result[0]->$checkField);
194
+        self::assertEquals($checkField."8", $result[0]->$checkField);
195 195
     }
196 196
 
197 197
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $iter = $paginator->getIterator();
207 207
         self::assertCount(3, $iter);
208 208
         $result = iterator_to_array($iter);
209
-        self::assertEquals($checkField . "5", $result[0]->$checkField);
209
+        self::assertEquals($checkField."5", $result[0]->$checkField);
210 210
     }
211 211
 
212 212
     /**
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBoth($useOutputWalkers)
480 480
     {
481 481
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
482
-        $dqlAsc = $dql . " ASC, d.name";
483
-        $dqlDesc = $dql . " DESC, d.name";
482
+        $dqlAsc = $dql." ASC, d.name";
483
+        $dqlDesc = $dql." DESC, d.name";
484 484
         $this->iterateWithOrderAsc($useOutputWalkers, true, $dqlAsc, "name");
485 485
         $this->iterateWithOrderDesc($useOutputWalkers, true, $dqlDesc, "name");
486 486
     }
@@ -488,8 +488,8 @@  discard block
 block discarded – undo
488 488
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBothWithLimitWithOutputWalker()
489 489
     {
490 490
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
491
-        $dqlAsc = $dql . " ASC, d.name";
492
-        $dqlDesc = $dql . " DESC, d.name";
491
+        $dqlAsc = $dql." ASC, d.name";
492
+        $dqlDesc = $dql." DESC, d.name";
493 493
         $this->iterateWithOrderAscWithLimit(true, true, $dqlAsc, "name");
494 494
         $this->iterateWithOrderDescWithLimit(true, true, $dqlDesc, "name");
495 495
     }
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
         $this->expectExceptionMessage('Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers.');
501 501
 
502 502
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
503
-        $dqlAsc = $dql . " ASC, d.name";
504
-        $dqlDesc = $dql . " DESC, d.name";
503
+        $dqlAsc = $dql." ASC, d.name";
504
+        $dqlDesc = $dql." DESC, d.name";
505 505
         $this->iterateWithOrderAscWithLimit(false, true, $dqlAsc, "name");
506 506
         $this->iterateWithOrderDescWithLimit(false, true, $dqlDesc, "name");
507 507
     }
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         $users = iterator_to_array($paginator->getIterator());
586 586
         self::assertCount(9, $users);
587 587
         foreach ($users as $i => $user) {
588
-            self::assertEquals("username" . (8 - $i), $user->username);
588
+            self::assertEquals("username".(8 - $i), $user->username);
589 589
         }
590 590
     }
591 591
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             $company->logo->image_width = 100 + $i;
736 736
             $company->logo->image_height = 100 + $i;
737 737
             $company->logo->company = $company;
738
-            for($j=0;$j<3;$j++) {
738
+            for ($j = 0; $j < 3; $j++) {
739 739
                 $department = new Department();
740 740
                 $department->name = "name$i$j";
741 741
                 $department->company = $company;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -91,6 +91,10 @@
 block discarded – undo
91 91
     /** @ORM\Column(type="integer") */
92 92
     public $numericValue;
93 93
 
94
+    /**
95
+     * @param string $name
96
+     * @param integer $number
97
+     */
94 98
     public function __construct($name, $number)
95 99
     {
96 100
         $this->name = $name;
Please login to merge, or discard this 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
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
                 $this->em->getClassMetadata(ReadOnlyEntity::class),
25 25
                 ]
26 26
             );
27
-        } catch(\Exception $e) {
27
+        } catch (\Exception $e) {
28 28
         }
29 29
     }
30 30
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheConcurrentTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Doctrine\ORM\Cache\DefaultCacheFactory;
8 8
 use Doctrine\ORM\Mapping\CacheMetadata;
9 9
 use Doctrine\ORM\Mapping\CacheUsage;
10
-use Doctrine\ORM\Mapping\ClassMetadata;
11 10
 use Doctrine\Tests\Mocks\ConcurrentRegionMock;
12 11
 use Doctrine\ORM\Cache\Region\DefaultRegion;
13 12
 use Doctrine\Tests\Mocks\TimestampRegionMock;
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/SecondLevelCacheExtraLazyCollectionTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Doctrine\Tests\Models\Cache\City;
9 9
 use Doctrine\Tests\Models\Cache\State;
10 10
 use Doctrine\Tests\Models\Cache\Travel;
11
-use Doctrine\ORM\Mapping\ClassMetadata;
12 11
 
13 12
 /**
14 13
  * @group DDC-2183
Please login to merge, or discard this 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\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.