Test Failed
Pull Request — master (#6759)
by Jan
63:55
created
Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php 4 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -94,6 +94,7 @@
 block discarded – undo
94 94
     }
95 95
 
96 96
     /**
97
+     * @param State $owner
97 98
      * @return \Doctrine\ORM\PersistentCollection
98 99
      */
99 100
     protected function createCollection($owner, $assoc = null, $class = null, $elements = null)
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,11 +6,9 @@
 block discarded – undo
6 6
 use Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister;
7 7
 use Doctrine\ORM\PersistentCollection;
8 8
 use Doctrine\Tests\OrmTestCase;
9
-
10 9
 use Doctrine\ORM\Cache\Region;
11 10
 use Doctrine\ORM\EntityManager;
12 11
 use Doctrine\ORM\Persisters\Collection\CollectionPersister;
13
-
14 12
 use Doctrine\Tests\Models\Cache\State;
15 13
 use Doctrine\Common\Collections\ArrayCollection;
16 14
 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
         $this->em                   = $this->_getTestEntityManager();
84 84
         $this->region               = $this->createRegion();
85 85
         $this->collectionPersister  = $this->getMockBuilder(CollectionPersister::class)
86
-                                           ->setMethods($this->collectionPersisterMockMethods)
87
-                                           ->getMock();
86
+                                            ->setMethods($this->collectionPersisterMockMethods)
87
+                                            ->getMock();
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             ->with($this->equalTo($collection), $this->equalTo(1), $this->equalTo(2))
192 192
             ->will($this->returnValue($slice));
193 193
 
194
-        $this->assertEquals($slice, $persister->slice($collection, 1 , 2));
194
+        $this->assertEquals($slice, $persister->slice($collection, 1, 2));
195 195
     }
196 196
 
197 197
     public function testInvokeContains()
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             ->with($this->equalTo($collection), $this->equalTo($element))
209 209
             ->will($this->returnValue(false));
210 210
 
211
-        $this->assertFalse($persister->contains($collection,$element));
211
+        $this->assertFalse($persister->contains($collection, $element));
212 212
     }
213 213
 
214 214
     public function testInvokeContainsKey()
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     }
115 115
 
116 116
     /**
117
-     * @return \Doctrine\ORM\Cache\Persister\AbstractEntityPersister
117
+     * @return \Doctrine\ORM\Cache\Persister\Entity\AbstractEntityPersister
118 118
      */
119 119
     protected function createPersisterDefault()
120 120
     {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@
 block discarded – undo
100 100
         $this->em               = $this->_getTestEntityManager();
101 101
         $this->region           = $this->createRegion();
102 102
         $this->entityPersister  = $this->getMockBuilder(EntityPersister::class)
103
-                                       ->setMethods($this->entityPersisterMockMethods)
104
-                                       ->getMock();
103
+                                        ->setMethods($this->entityPersisterMockMethods)
104
+                                        ->getMock();
105 105
     }
106 106
 
107 107
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
             ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2))
381 381
             ->will($this->returnValue([$entity]));
382 382
 
383
-        $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1 ,2));
383
+        $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1, 2));
384 384
     }
385 385
 
386 386
     public function testInvokeGetOneToManyCollection()
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2))
394 394
             ->will($this->returnValue([$entity]));
395 395
 
396
-        $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1 ,2));
396
+        $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1, 2));
397 397
     }
398 398
 
399 399
     public function testInvokeLoadManyToManyCollection()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTestCase.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     }
28 28
 
29 29
     /**
30
-     * @param  string $className
30
+     * @param  string $classNames
31 31
      * @return ClassMetadata
32 32
      */
33 33
     protected function extractClassMetadata(array $classNames)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $driver = new DatabaseDriver($sm);
41 41
 
42 42
         foreach ($driver->getAllClassNames() as $className) {
43
-            if (!in_array(strtolower($className), $classNames)) {
43
+            if ( ! in_array(strtolower($className), $classNames)) {
44 44
                 continue;
45 45
             }
46 46
             $class = new ClassMetadataInfo($className);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         if (count($metadatas) != count($classNames)) {
52
-            $this->fail("Have not found all classes matching the names '" . implode(", ", $classNames) . "' only tables " . implode(", ", array_keys($metadatas)));
52
+            $this->fail("Have not found all classes matching the names '".implode(", ", $classNames)."' only tables ".implode(", ", array_keys($metadatas)));
53 53
         }
54 54
         return $metadatas;
55 55
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php 3 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -375,8 +375,16 @@
 block discarded – undo
375 375
     private $name;
376 376
     public function getId() {return $this->id;}
377 377
     public function getValue() {return $this->value;}
378
+
379
+    /**
380
+     * @param string $value
381
+     */
378 382
     public function setValue($value) {$this->value = $value;}
379 383
     public function getName() {return $this->name;}
384
+
385
+    /**
386
+     * @param string $name
387
+     */
380 388
     public function setName($name) {$this->name = $name;}
381 389
     /** @PreUpdate */
382 390
     public function testCallback() {$this->value = 'Hello World';}
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -302,8 +302,8 @@
 block discarded – undo
302 302
     }
303 303
 
304 304
     /**
305
-    * @group DDC-1955
306
-    */
305
+     * @group DDC-1955
306
+     */
307 307
     public function testLifecycleCallbackEventArgs()
308 308
     {
309 309
         $e = new LifecycleCallbackEventArgEntity;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -350,13 +350,13 @@
 block discarded – undo
350 350
     private $value;
351 351
     /** @Column(type="string") */
352 352
     private $name;
353
-    public function getId() {return $this->id;}
354
-    public function getValue() {return $this->value;}
355
-    public function setValue($value) {$this->value = $value;}
356
-    public function getName() {return $this->name;}
357
-    public function setName($name) {$this->name = $name;}
353
+    public function getId() {return $this->id; }
354
+    public function getValue() {return $this->value; }
355
+    public function setValue($value) {$this->value = $value; }
356
+    public function getName() {return $this->name; }
357
+    public function setName($name) {$this->name = $name; }
358 358
     /** @PreUpdate */
359
-    public function testCallback() {$this->value = 'Hello World';}
359
+    public function testCallback() {$this->value = 'Hello World'; }
360 360
 }
361 361
 
362 362
 /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -141,6 +141,9 @@
 block discarded – undo
141 141
         return $this->session;
142 142
     }
143 143
 
144
+    /**
145
+     * @param string $session
146
+     */
144 147
     public function setSession($session)
145 148
     {
146 149
         $this->session = $session;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -94,6 +94,9 @@  discard block
 block discarded – undo
94 94
         $this->listeners[] = $listener;
95 95
     }
96 96
 
97
+    /**
98
+     * @param string $propName
99
+     */
97 100
     protected function onPropertyChanged($propName, $oldValue, $newValue) {
98 101
         if ($this->listeners) {
99 102
             foreach ($this->listeners as $listener) {
@@ -126,6 +129,9 @@  discard block
 block discarded – undo
126 129
         return $this->name;
127 130
     }
128 131
 
132
+    /**
133
+     * @param string $name
134
+     */
129 135
     function setName($name) {
130 136
         $this->onPropertyChanged('name', $this->name, $name);
131 137
         $this->name = $name;
@@ -159,6 +165,9 @@  discard block
 block discarded – undo
159 165
         return $this->name;
160 166
     }
161 167
 
168
+    /**
169
+     * @param string $name
170
+     */
162 171
     function setName($name) {
163 172
         $this->onPropertyChanged('name', $this->name, $name);
164 173
         $this->name = $name;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/OneToOneEagerLoadingTest.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -286,6 +286,9 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public $train;
288 288
 
289
+    /**
290
+     * @param string $name
291
+     */
289 292
     public function __construct($name)
290 293
     {
291 294
         $this->name = $name;
@@ -312,6 +315,9 @@  discard block
 block discarded – undo
312 315
      */
313 316
     public $train;
314 317
 
318
+    /**
319
+     * @param string $name
320
+     */
315 321
     public function __construct($name)
316 322
     {
317 323
         $this->name = $name;
@@ -336,6 +342,9 @@  discard block
 block discarded – undo
336 342
      */
337 343
     public $train;
338 344
 
345
+    /**
346
+     * @param Train $train
347
+     */
339 348
     public function setTrain($train)
340 349
     {
341 350
         $this->train = $train;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 $this->_em->getClassMetadata(TrainOrder::class),
26 26
                 ]
27 27
             );
28
-        } catch(\Exception $e) {}
28
+        } catch (\Exception $e) {}
29 29
     }
30 30
 
31 31
     /**
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
@@ -118,6 +118,10 @@  discard block
 block discarded – undo
118 118
         $this->assertCount(3, $paginator->getIterator());
119 119
     }
120 120
 
121
+    /**
122
+     * @param string $baseDql
123
+     * @param string $checkField
124
+     */
121 125
     private function iterateWithOrderAsc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
122 126
     {
123 127
         // Ascending
@@ -132,6 +136,10 @@  discard block
 block discarded – undo
132 136
         $this->assertEquals($checkField . "0", $result[0]->$checkField);
133 137
     }
134 138
 
139
+    /**
140
+     * @param string $baseDql
141
+     * @param string $checkField
142
+     */
135 143
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
136 144
     {
137 145
         // Ascending
@@ -148,6 +156,10 @@  discard block
 block discarded – undo
148 156
         $this->assertEquals($checkField . "0", $result[0]->$checkField);
149 157
     }
150 158
 
159
+    /**
160
+     * @param string $baseDql
161
+     * @param string $checkField
162
+     */
151 163
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
152 164
     {
153 165
         // Ascending
@@ -164,6 +176,10 @@  discard block
 block discarded – undo
164 176
         $this->assertEquals($checkField . "3", $result[0]->$checkField);
165 177
     }
166 178
 
179
+    /**
180
+     * @param string $baseDql
181
+     * @param string $checkField
182
+     */
167 183
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
168 184
     {
169 185
         $dql = "$baseDql DESC";
@@ -177,6 +193,10 @@  discard block
 block discarded – undo
177 193
         $this->assertEquals($checkField . "8", $result[0]->$checkField);
178 194
     }
179 195
 
196
+    /**
197
+     * @param string $baseDql
198
+     * @param string $checkField
199
+     */
180 200
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
181 201
     {
182 202
         $dql = "$baseDql DESC";
@@ -192,6 +212,10 @@  discard block
 block discarded – undo
192 212
         $this->assertEquals($checkField . "8", $result[0]->$checkField);
193 213
     }
194 214
 
215
+    /**
216
+     * @param string $baseDql
217
+     * @param string $checkField
218
+     */
195 219
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
196 220
     {
197 221
         $dql = "$baseDql DESC";
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $iter = $paginator->getIterator();
130 130
         $this->assertCount(9, $iter);
131 131
         $result = iterator_to_array($iter);
132
-        $this->assertEquals($checkField . "0", $result[0]->$checkField);
132
+        $this->assertEquals($checkField."0", $result[0]->$checkField);
133 133
     }
134 134
 
135 135
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $iter = $paginator->getIterator();
146 146
         $this->assertCount(3, $iter);
147 147
         $result = iterator_to_array($iter);
148
-        $this->assertEquals($checkField . "0", $result[0]->$checkField);
148
+        $this->assertEquals($checkField."0", $result[0]->$checkField);
149 149
     }
150 150
 
151 151
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $iter = $paginator->getIterator();
162 162
         $this->assertCount(3, $iter);
163 163
         $result = iterator_to_array($iter);
164
-        $this->assertEquals($checkField . "3", $result[0]->$checkField);
164
+        $this->assertEquals($checkField."3", $result[0]->$checkField);
165 165
     }
166 166
 
167 167
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $iter = $paginator->getIterator();
175 175
         $this->assertCount(9, $iter);
176 176
         $result = iterator_to_array($iter);
177
-        $this->assertEquals($checkField . "8", $result[0]->$checkField);
177
+        $this->assertEquals($checkField."8", $result[0]->$checkField);
178 178
     }
179 179
 
180 180
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $iter = $paginator->getIterator();
190 190
         $this->assertCount(3, $iter);
191 191
         $result = iterator_to_array($iter);
192
-        $this->assertEquals($checkField . "8", $result[0]->$checkField);
192
+        $this->assertEquals($checkField."8", $result[0]->$checkField);
193 193
     }
194 194
 
195 195
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $iter = $paginator->getIterator();
205 205
         $this->assertCount(3, $iter);
206 206
         $result = iterator_to_array($iter);
207
-        $this->assertEquals($checkField . "5", $result[0]->$checkField);
207
+        $this->assertEquals($checkField."5", $result[0]->$checkField);
208 208
     }
209 209
 
210 210
     /**
@@ -477,8 +477,8 @@  discard block
 block discarded – undo
477 477
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBoth($useOutputWalkers)
478 478
     {
479 479
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
480
-        $dqlAsc = $dql . " ASC, d.name";
481
-        $dqlDesc = $dql . " DESC, d.name";
480
+        $dqlAsc = $dql." ASC, d.name";
481
+        $dqlDesc = $dql." DESC, d.name";
482 482
         $this->iterateWithOrderAsc($useOutputWalkers, true, $dqlAsc, "name");
483 483
         $this->iterateWithOrderDesc($useOutputWalkers, true, $dqlDesc, "name");
484 484
     }
@@ -486,8 +486,8 @@  discard block
 block discarded – undo
486 486
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBothWithLimitWithOutputWalker()
487 487
     {
488 488
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
489
-        $dqlAsc = $dql . " ASC, d.name";
490
-        $dqlDesc = $dql . " DESC, d.name";
489
+        $dqlAsc = $dql." ASC, d.name";
490
+        $dqlDesc = $dql." DESC, d.name";
491 491
         $this->iterateWithOrderAscWithLimit(true, true, $dqlAsc, "name");
492 492
         $this->iterateWithOrderDescWithLimit(true, true, $dqlDesc, "name");
493 493
     }
@@ -498,8 +498,8 @@  discard block
 block discarded – undo
498 498
         $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.');
499 499
 
500 500
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
501
-        $dqlAsc = $dql . " ASC, d.name";
502
-        $dqlDesc = $dql . " DESC, d.name";
501
+        $dqlAsc = $dql." ASC, d.name";
502
+        $dqlDesc = $dql." DESC, d.name";
503 503
         $this->iterateWithOrderAscWithLimit(false, true, $dqlAsc, "name");
504 504
         $this->iterateWithOrderDescWithLimit(false, true, $dqlDesc, "name");
505 505
     }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
         $users = iterator_to_array($paginator->getIterator());
584 584
         $this->assertCount(9, $users);
585 585
         foreach ($users as $i => $user) {
586
-            $this->assertEquals("username" . (8 - $i), $user->username);
586
+            $this->assertEquals("username".(8 - $i), $user->username);
587 587
         }
588 588
     }
589 589
 
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
             $company->logo->image_width = 100 + $i;
734 734
             $company->logo->image_height = 100 + $i;
735 735
             $company->logo->company = $company;
736
-            for($j=0;$j<3;$j++) {
736
+            for ($j = 0; $j < 3; $j++) {
737 737
                 $department = new Department();
738 738
                 $department->name = "name$i$j";
739 739
                 $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
@@ -84,6 +84,10 @@
 block discarded – undo
84 84
     /** @Column(type="integer") */
85 85
     public $numericValue;
86 86
 
87
+    /**
88
+     * @param string $name
89
+     * @param integer $number
90
+     */
87 91
     public function __construct($name, $number)
88 92
     {
89 93
         $this->name = $name;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
                 $this->_em->getClassMetadata(ReadOnlyEntity::class),
22 22
                 ]
23 23
             );
24
-        } catch(\Exception $e) {
24
+        } catch (\Exception $e) {
25 25
         }
26 26
     }
27 27
 
Please login to merge, or discard this patch.