Completed
Pull Request — 2.8.x (#8130)
by Gabriel
07:41
created
tests/Doctrine/Tests/Mocks/ConnectionMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
     public function quote($input, $type = null)
96 96
     {
97 97
         if (is_string($input)) {
98
-            return "'" . $input . "'";
98
+            return "'".$input."'";
99 99
         }
100 100
         return $input;
101 101
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/StatementMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     /**
36 36
      * {@inheritdoc}
37 37
      */
38
-    public function errorInfo(){}
38
+    public function errorInfo() {}
39 39
 
40 40
     /**
41 41
      * {@inheritdoc}
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/DriverConnectionMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     /**
50 50
      * {@inheritdoc}
51 51
      */
52
-    public function quote($input, $type=\PDO::PARAM_STR)
52
+    public function quote($input, $type = \PDO::PARAM_STR)
53 53
     {
54 54
     }
55 55
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/EntityManagerMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     {
71 71
         if (null === $config) {
72 72
             $config = new Configuration();
73
-            $config->setProxyDir(__DIR__ . '/../Proxies');
73
+            $config->setProxyDir(__DIR__.'/../Proxies');
74 74
             $config->setProxyNamespace('Doctrine\Tests\Proxies');
75 75
             $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver([], true));
76 76
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DetachedEntityTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         $this->_em->flush();
174 174
         $this->_em->detach($user);
175 175
 
176
-        $dql = 'SELECT u FROM ' . CmsUser::class . ' u WHERE u.id = ?1';
176
+        $dql = 'SELECT u FROM '.CmsUser::class.' u WHERE u.id = ?1';
177 177
         $query = $this->_em->createQuery($dql);
178 178
         $query->setParameter(1, $user);
179 179
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         $this->_em->detach($article);
218 218
 
219
-        $sql = 'UPDATE cms_articles SET version = version + 1 WHERE id = ' . $article->id;
219
+        $sql = 'UPDATE cms_articles SET version = version + 1 WHERE id = '.$article->id;
220 220
         $this->_em->getConnection()->executeUpdate($sql);
221 221
 
222 222
         $this->expectException(OptimisticLockException::class);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $repos = $this->_em->getRepository(CmsUser::class);
181 181
 
182 182
         $user = $repos->find($user1Id);
183
-        $this->assertInstanceOf(CmsUser::class,$user);
183
+        $this->assertInstanceOf(CmsUser::class, $user);
184 184
         $this->assertEquals('Roman', $user->name);
185 185
         $this->assertEquals('freak', $user->status);
186 186
     }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         $users = $repos->findBy(['status' => 'dev']);
194 194
         $this->assertEquals(2, count($users));
195
-        $this->assertInstanceOf(CmsUser::class,$users[0]);
195
+        $this->assertInstanceOf(CmsUser::class, $users[0]);
196 196
         $this->assertEquals('Guilherme', $users[0]->name);
197 197
         $this->assertEquals('dev', $users[0]->status);
198 198
     }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         $addresses  = $repository->findBy(['user' => [$user1->getId(), $user2->getId()]]);
219 219
 
220 220
         $this->assertEquals(2, count($addresses));
221
-        $this->assertInstanceOf(CmsAddress::class,$addresses[0]);
221
+        $this->assertInstanceOf(CmsAddress::class, $addresses[0]);
222 222
     }
223 223
 
224 224
     public function testFindByAssociationWithObjectAsParameter()
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         $addresses  = $repository->findBy(['user' => [$user1, $user2]]);
243 243
 
244 244
         $this->assertEquals(2, count($addresses));
245
-        $this->assertInstanceOf(CmsAddress::class,$addresses[0]);
245
+        $this->assertInstanceOf(CmsAddress::class, $addresses[0]);
246 246
     }
247 247
 
248 248
     public function testFindFieldByMagicCall()
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
         $users = $repos->findByStatus('dev');
254 254
         $this->assertEquals(2, count($users));
255
-        $this->assertInstanceOf(CmsUser::class,$users[0]);
255
+        $this->assertInstanceOf(CmsUser::class, $users[0]);
256 256
         $this->assertEquals('Guilherme', $users[0]->name);
257 257
         $this->assertEquals('dev', $users[0]->status);
258 258
     }
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         $this->assertEquals(2, count($usersAsc));
593 593
         $this->assertEquals(2, count($usersDesc));
594 594
 
595
-        $this->assertInstanceOf(CmsUser::class,$usersAsc[0]);
595
+        $this->assertInstanceOf(CmsUser::class, $usersAsc[0]);
596 596
         $this->assertEquals('Alexander', $usersAsc[0]->name);
597 597
         $this->assertEquals('dev', $usersAsc[0]->status);
598 598
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
     public function testCanRetrieveRepositoryFromClassNameWithLeadingBackslash()
674 674
     {
675 675
         $this->assertSame(
676
-            $this->_em->getRepository('\\' . CmsUser::class),
676
+            $this->_em->getRepository('\\'.CmsUser::class),
677 677
             $this->_em->getRepository(CmsUser::class)
678 678
         );
679 679
     }
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
         $data = $repo->findBy(['user' => [1, 2, 3]]);
712 712
 
713 713
         $query = array_pop($this->_sqlLoggerStack->queries);
714
-        $this->assertEquals([1,2,3], $query['params'][0]);
714
+        $this->assertEquals([1, 2, 3], $query['params'][0]);
715 715
         $this->assertEquals(Connection::PARAM_INT_ARRAY, $query['types'][0]);
716 716
     }
717 717
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
     public function testExceptionIsThrownWhenCallingFindByWithoutParameter() {
310 310
         $this->expectException('Doctrine\ORM\ORMException');
311 311
         $this->_em->getRepository(CmsUser::class)
312
-                  ->findByStatus();
312
+                    ->findByStatus();
313 313
     }
314 314
 
315 315
     public function testExceptionIsThrownWhenUsingInvalidFieldName() {
316 316
         $this->expectException('Doctrine\ORM\ORMException');
317 317
         $this->_em->getRepository(CmsUser::class)
318
-                  ->findByThisFieldDoesNotExist('testvalue');
318
+                    ->findByThisFieldDoesNotExist('testvalue');
319 319
     }
320 320
 
321 321
     /**
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $this->expectException(TransactionRequiredException::class);
328 328
 
329 329
         $this->_em->getRepository(CmsUser::class)
330
-                  ->find(1, LockMode::PESSIMISTIC_READ);
330
+                    ->find(1, LockMode::PESSIMISTIC_READ);
331 331
     }
332 332
 
333 333
     /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $this->expectException(TransactionRequiredException::class);
340 340
 
341 341
         $this->_em->getRepository(CmsUser::class)
342
-                  ->find(1, LockMode::PESSIMISTIC_WRITE);
342
+                    ->find(1, LockMode::PESSIMISTIC_WRITE);
343 343
     }
344 344
 
345 345
     /**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $this->expectException(OptimisticLockException::class);
352 352
 
353 353
         $this->_em->getRepository(CmsUser::class)
354
-                  ->find(1, LockMode::OPTIMISTIC);
354
+                    ->find(1, LockMode::OPTIMISTIC);
355 355
     }
356 356
 
357 357
     /**
@@ -432,13 +432,13 @@  discard block
 block discarded – undo
432 432
      */
433 433
     public function testFindOneByOrderBy()
434 434
     {
435
-    	$this->loadFixture();
435
+        $this->loadFixture();
436 436
 
437
-    	$repos = $this->_em->getRepository(CmsUser::class);
438
-    	$userAsc = $repos->findOneBy([], ["username" => "ASC"]);
439
-    	$userDesc = $repos->findOneBy([], ["username" => "DESC"]);
437
+        $repos = $this->_em->getRepository(CmsUser::class);
438
+        $userAsc = $repos->findOneBy([], ["username" => "ASC"]);
439
+        $userDesc = $repos->findOneBy([], ["username" => "DESC"]);
440 440
 
441
-    	$this->assertNotSame($userAsc, $userDesc);
441
+        $this->assertNotSame($userAsc, $userDesc);
442 442
     }
443 443
 
444 444
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -265,8 +265,8 @@
 block discarded – undo
265 265
         $this->_em->clear();
266 266
 
267 267
         $newUser = $this->_em->createQuery('SELECT u, g FROM Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.groups g WHERE u.id = ?1')
268
-                             ->setParameter(1, $user->getId())
269
-                             ->getSingleResult();
268
+                                ->setParameter(1, $user->getId())
269
+                                ->getSingleResult();
270 270
         $this->assertEquals(0, count($newUser->groups));
271 271
         $this->assertInternalType('array', $newUser->groups->getMapping());
272 272
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -290,9 +290,9 @@  discard block
 block discarded – undo
290 290
         $user->username = 'gblanco';
291 291
         $user->status = 'developer';
292 292
 
293
-        for ($i=0; $i < $groupCount; ++$i) {
293
+        for ($i = 0; $i < $groupCount; ++$i) {
294 294
             $group = new CmsGroup;
295
-            $group->name = 'Developers_' . $i;
295
+            $group->name = 'Developers_'.$i;
296 296
             $user->addGroup($group);
297 297
         }
298 298
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
             $user
407 407
                 ->getGroups()
408 408
                 ->matching($criteria)
409
-                ->map(function (CmsGroup $group) {
409
+                ->map(function(CmsGroup $group) {
410 410
                     return $group->getName();
411 411
                 })
412 412
                 ->toArray()
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
             $user
451 451
                 ->getTags()
452 452
                 ->matching($criteria)
453
-                ->map(function (CmsTag $tag) {
453
+                ->map(function(CmsTag $tag) {
454 454
                     return $tag->getName();
455 455
                 })
456 456
                 ->toArray()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -237,10 +237,10 @@
 block discarded – undo
237 237
     {
238 238
         $config = new Configuration();
239 239
 
240
-        $config->setProxyDir(realpath(__DIR__ . '/../../Proxies'));
240
+        $config->setProxyDir(realpath(__DIR__.'/../../Proxies'));
241 241
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
242 242
         $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver(
243
-            [realpath(__DIR__ . '/../../Models/Cache')],
243
+            [realpath(__DIR__.'/../../Models/Cache')],
244 244
             true
245 245
         ));
246 246
         $config->setSQLLogger($logger);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CascadeRemoveOrderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,10 +152,10 @@
 block discarded – undo
152 152
      */
153 153
     private $ownerO;
154 154
 
155
-    public function __construct(CascadeRemoveOrderEntityO $eO, $position=1)
155
+    public function __construct(CascadeRemoveOrderEntityO $eO, $position = 1)
156 156
     {
157 157
         $this->position = $position;
158
-        $this->ownerO= $eO;
158
+        $this->ownerO = $eO;
159 159
         $this->ownerO->addOneToManyG($this);
160 160
     }
161 161
 
Please login to merge, or discard this patch.