Failed Conditions
Pull Request — develop (#6874)
by
unknown
157:35 queued 92:38
created
tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
     /**
236 236
      *
237
-     * @return kateglo\application\helpers\collections\ArrayCollection
237
+     * @return ArrayCollection
238 238
      */
239 239
     public function getTypes()
240 240
     {
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
     /**
339 339
      *
340
-     * @param kateglo\application\models\Lemma $lemma
340
+     * @param Lemma $lemma
341 341
      * @return void
342 342
      */
343 343
     public function addLemma(Lemma $lemma)
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
     /**
352 352
      *
353
-     * @param kateglo\application\models\Lemma $lemma
353
+     * @param Lemma $lemma
354 354
      * @return void
355 355
      */
356 356
     public function removeLEmma(Lemma $lemma)
Please login to merge, or discard this 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;
6 6
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      *
207 207
      * @return string
208 208
      */
209
-    public function getLemma(){
209
+    public function getLemma() {
210 210
         return $this->lemma;
211 211
     }
212 212
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public function addType(Type $type)
217 217
     {
218
-        if (!$this->types->contains($type)) {
218
+        if ( ! $this->types->contains($type)) {
219 219
             $this->types[] = $type;
220 220
             $type->addLemma($this);
221 221
         }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function addLemma(Lemma $lemma)
344 344
     {
345
-        if (!$this->lemmas->contains($lemma)) {
345
+        if ( ! $this->lemmas->contains($lemma)) {
346 346
             $this->lemmas[] = $lemma;
347 347
             $lemma->addType($this);
348 348
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 declare(strict_types=1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6
-use Doctrine\Common\Util\Debug;
7 6
 use Doctrine\ORM\ORMException;
8 7
 use Doctrine\ORM\Query\QueryException;
9 8
 use Doctrine\Tests\Models\Navigation\NavCountry;
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
         $this->putTripAroundEurope();
113 113
 
114 114
         $dql = 'SELECT t, p, c '
115
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
116
-             . 'INNER JOIN t.pois p '
117
-             . 'INNER JOIN p.country c'
115
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
116
+                . 'INNER JOIN t.pois p '
117
+                . 'INNER JOIN p.country c'
118 118
         ;
119 119
 
120 120
         $tours = $this->em->createQuery($dql)->getResult();
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
         $this->putTripAroundEurope();
135 135
 
136 136
         $dql = 'SELECT t '
137
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
138
-             . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
139
-             . 'WHERE p MEMBER OF t.pois'
137
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
138
+                . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
139
+                . 'WHERE p MEMBER OF t.pois'
140 140
         ;
141 141
 
142 142
         $query = $this->em->createQuery($dql);
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
 use Doctrine\Common\Util\Debug;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
7
-use Doctrine\ORM\Mapping\ClassMetadata;
8 7
 use Doctrine\ORM\Mapping\FetchMode;
9 8
 use Doctrine\Tests\Models\CMS\CmsArticle;
10 9
 use Doctrine\Tests\Models\CMS\CmsGroup;
Please login to merge, or discard this 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;
6 6
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->useModelSet('ddc2504');
44 44
         parent::setUp();
45 45
 
46
-        $class       = $this->em->getClassMetadata(CmsUser::class);
46
+        $class = $this->em->getClassMetadata(CmsUser::class);
47 47
 
48 48
         $class->getProperty('groups')->setFetchMode(FetchMode::EXTRA_LAZY);
49 49
         $class->getProperty('articles')->setFetchMode(FetchMode::EXTRA_LAZY);
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 
305 305
         $queryCount = $this->getCurrentQueryCount();
306 306
         self::assertFalse($user->articles->contains($article));
307
-        self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed.");
307
+        self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed.");
308 308
         self::assertFalse($user->articles->isInitialized(), "Post-Condition: Collection is not initialized.");
309 309
 
310 310
         // Test One to Many existence with state managed
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 
472 472
         $queryCount = $this->getCurrentQueryCount();
473 473
         self::assertTrue($group->users->contains($user));
474
-        self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed.");
474
+        self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed.");
475 475
         self::assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized.");
476 476
 
477 477
         $newUser = new CmsUser();
@@ -1251,7 +1251,7 @@  discard block
 block discarded – undo
1251 1251
         $user     = new User();
1252 1252
         $userList = new UserList();
1253 1253
 
1254
-        $user->name     = 'ocramius';
1254
+        $user->name = 'ocramius';
1255 1255
         $userList->listName = 'PHP Developers to follow closely';
1256 1256
 
1257 1257
         $user->addUserList($userList);
Please login to merge, or discard this patch.
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.