Failed Conditions
Pull Request — master (#6762)
by Claudio
19:02
created
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
         $entity     = $this->_em->find(Travel::class, $entitiId);
233 233
 
234 234
         self::assertEquals(0, $entity->getVisitedCities()->count());
235
-        self::assertEquals($queryCount+2, $this->getCurrentQueryCount());
235
+        self::assertEquals($queryCount + 2, $this->getCurrentQueryCount());
236 236
 
237 237
         $this->_em->clear();
238 238
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Hydration/ResultSetMappingTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $rms = $this->_rsm;
78 78
 
79
-        $this->_rsm->addEntityResult(CmsUser::class,'u');
80
-        $this->_rsm->addJoinedEntityResult(CmsPhonenumber::class,'p','u','phonenumbers');
79
+        $this->_rsm->addEntityResult(CmsUser::class, 'u');
80
+        $this->_rsm->addJoinedEntityResult(CmsPhonenumber::class, 'p', 'u', 'phonenumbers');
81 81
         $this->_rsm->addFieldResult('u', 'id', 'id');
82 82
         $this->_rsm->addFieldResult('u', 'name', 'name');
83 83
         $this->_rsm->setDiscriminatorColumn('name', 'name');
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
     {
277 277
         $this->_rsm->addEntityResult(LegacyUser::class, 'u');
278 278
         $this->_rsm->addJoinedEntityResult(LegacyUserReference::class, 'lu', 'u', '_references');
279
-        $this->_rsm->addMetaResult('lu', '_source',  '_source', true, 'integer');
280
-        $this->_rsm->addMetaResult('lu', '_target',  '_target', true, 'integer');
279
+        $this->_rsm->addMetaResult('lu', '_source', '_source', true, 'integer');
280
+        $this->_rsm->addMetaResult('lu', '_target', '_target', true, 'integer');
281 281
         $this->_rsm->addIndexBy('lu', '_source');
282 282
 
283 283
         self::assertTrue($this->_rsm->hasIndexBy('lu'));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $result[] = $city;
134 134
 
135 135
             $cityClass->setFieldValue($city, 'id', $i);
136
-            $stateClass->setFieldValue($state, 'id', $i*2);
136
+            $stateClass->setFieldValue($state, 'id', $i * 2);
137 137
 
138 138
             $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]);
139 139
             $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]);
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
             $result[] = $city;
179 179
 
180 180
             $cityClass->setFieldValue($city, 'id', $i);
181
-            $stateClass->setFieldValue($state, 'id', $i*2);
182
-            $countryClass->setFieldValue($country, 'id', $i*3);
181
+            $stateClass->setFieldValue($state, 'id', $i * 2);
182
+            $countryClass->setFieldValue($country, 'id', $i * 3);
183 183
 
184 184
             $uow->registerManaged($country, ['id' => $country->getId()], ['name' => $country->getName()]);
185 185
             $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'country' => $country]
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]);
403 403
         $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]);
404 404
 
405
-        $this->region->addReturn('put', true);  // put root entity
405
+        $this->region->addReturn('put', true); // put root entity
406 406
         $this->region->addReturn('put', false); // association fails
407 407
 
408 408
         self::assertFalse($this->queryCache->put($key, $rsm, $result));
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
         $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'cities' => $state->getCities()]
438 438
         );
439 439
 
440
-        $this->region->addReturn('put', true);  // put root entity
440
+        $this->region->addReturn('put', true); // put root entity
441 441
         $this->region->addReturn('put', false); // collection association fails
442 442
 
443 443
         self::assertFalse($this->queryCache->put($key, $rsm, $result));
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
         $attractions = $reflection->invoke($this->queryCache, $rsm, 'a', $bavaria);
603 603
 
604 604
         self::assertCount(2, $cities);
605
-        self::assertCount(2,  $attractions);
605
+        self::assertCount(2, $attractions);
606 606
 
607 607
         self::assertInstanceOf(Collection::class, $cities);
608 608
         self::assertInstanceOf(Collection::class, $attractions[0]);
Please login to merge, or discard this patch.
Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php 1 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
-        self::assertEquals($slice, $persister->slice($collection, 1 , 2));
194
+        self::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
-        self::assertFalse($persister->contains($collection,$element));
211
+        self::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 1 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
-        self::assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1 ,2));
383
+        self::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
-        self::assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1 ,2));
396
+        self::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/Cache/FileLockRegionTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     protected function createRegion()
54 54
     {
55
-        $this->directory = sys_get_temp_dir() . '/doctrine_lock_'. uniqid();
55
+        $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid();
56 56
 
57 57
         $region = new DefaultRegion('concurren_region_test', $this->cache);
58 58
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 
101 101
         file_put_contents($file, 'foo');
102 102
         self::assertFileExists($file);
103
-        self::assertEquals('foo' , file_get_contents($file));
103
+        self::assertEquals('foo', file_get_contents($file));
104 104
 
105 105
         self::assertNull($this->region->lock($key));
106
-        self::assertEquals('foo' , file_get_contents($file));
106
+        self::assertEquals('foo', file_get_contents($file));
107 107
         self::assertFileExists($file);
108 108
 
109 109
         // should be not available
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         // change the lock
129 129
         file_put_contents($file, 'foo');
130 130
         self::assertFileExists($file);
131
-        self::assertEquals('foo' , file_get_contents($file));
131
+        self::assertEquals('foo', file_get_contents($file));
132 132
 
133 133
         //try to unlock
134 134
         self::assertFalse($this->region->unlock($key, $lock));
135
-        self::assertEquals('foo' , file_get_contents($file));
135
+        self::assertEquals('foo', file_get_contents($file));
136 136
         self::assertFileExists($file);
137 137
 
138 138
         // should be not available
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
         // create lock
154 154
         file_put_contents($file, 'foo');
155 155
         self::assertFileExists($file);
156
-        self::assertEquals('foo' , file_get_contents($file));
156
+        self::assertEquals('foo', file_get_contents($file));
157 157
 
158 158
         self::assertFalse($this->region->contains($key));
159 159
         self::assertFalse($this->region->put($key, $entry));
160 160
         self::assertFalse($this->region->contains($key));
161 161
 
162 162
         self::assertFileExists($file);
163
-        self::assertEquals('foo' , file_get_contents($file));
163
+        self::assertEquals('foo', file_get_contents($file));
164 164
     }
165 165
 
166 166
     public function testLockedEvict()
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $reflectionDirectory->setAccessible(true);
256 256
         $reflectionDirectory->setValue($region, str_repeat('a', 10000));
257 257
 
258
-        set_error_handler(function () {}, E_WARNING);
258
+        set_error_handler(function() {}, E_WARNING);
259 259
         self::assertTrue($region->evictAll());
260 260
         restore_error_handler();
261 261
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/DefaultEntityHydratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         $entity->setId(1);
82 82
         $uow->registerManaged($entity, $key->identifier, $data);
83 83
 
84
-        $cache  = $this->structure->buildCacheEntry($metadata, $key, $entity);
84
+        $cache = $this->structure->buildCacheEntry($metadata, $key, $entity);
85 85
 
86 86
         self::assertInstanceOf(CacheEntry::class, $cache);
87 87
         self::assertInstanceOf(EntityCacheEntry::class, $cache);
Please login to merge, or discard this patch.