Failed Conditions
Pull Request — master (#6762)
by Claudio
19:02
created
tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -411,9 +411,9 @@
 block discarded – undo
411 411
 
412 412
         $dql = 'SELECT f FROM Doctrine\Tests\Models\Company\CompanyFixContract f WHERE f.id = ?1';
413 413
         $contract = $this->_em->createQuery($dql)
414
-                              ->setFetchMode(CompanyFixContract::class, 'salesPerson', ClassMetadata::FETCH_EAGER)
415
-                              ->setParameter(1, $this->fix->getId())
416
-                              ->getSingleResult();
414
+                                ->setFetchMode(CompanyFixContract::class, 'salesPerson', ClassMetadata::FETCH_EAGER)
415
+                                ->setParameter(1, $this->fix->getId())
416
+                                ->getSingleResult();
417 417
 
418 418
         self::assertNotInstanceOf(Proxy::class, $contract->getSalesPerson());
419 419
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -330,19 +330,19 @@
 block discarded – undo
330 330
 
331 331
         $repos = $this->_em->getRepository(CompanyContract::class);
332 332
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
333
-        self::assertEquals(3, count($contracts), "There should be 3 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyContract'");
333
+        self::assertEquals(3, count($contracts), "There should be 3 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyContract'");
334 334
 
335 335
         $repos = $this->_em->getRepository(CompanyFixContract::class);
336 336
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
337
-        self::assertEquals(1, count($contracts), "There should be 1 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
337
+        self::assertEquals(1, count($contracts), "There should be 1 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
338 338
 
339 339
         $repos = $this->_em->getRepository(CompanyFlexContract::class);
340 340
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
341
-        self::assertEquals(2, count($contracts), "There should be 2 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
341
+        self::assertEquals(2, count($contracts), "There should be 2 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
342 342
 
343 343
         $repos = $this->_em->getRepository(CompanyFlexUltraContract::class);
344 344
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
345
-        self::assertEquals(1, count($contracts), "There should be 1 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
345
+        self::assertEquals(1, count($contracts), "There should be 1 entities related to ".$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
346 346
     }
347 347
 
348 348
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1250Test.php 2 patches
Indentation   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $this->_em->clear();
37 37
 
38 38
         $history = $this->_em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1')
39
-                  ->setParameter(1, $c2->id)->getSingleResult();
39
+                    ->setParameter(1, $c2->id)->getSingleResult();
40 40
 
41 41
         self::assertInstanceOf(DDC1250ClientHistory::class, $history);
42 42
     }
@@ -88,6 +88,4 @@  discard block
 block discarded – undo
88 88
 mappedBy: declinedClientsHistory
89 89
 lifecycleCallbacks: { }
90 90
 repositoryClass: Entities\ClientsHistoryRepository
91
-
92
-
93 91
  */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
                 $this->_em->getClassMetadata(DDC1250ClientHistory::class),
17 17
                 ]
18 18
             );
19
-        } catch(\PDOException $e) {
19
+        } catch (\PDOException $e) {
20 20
 
21 21
         }
22 22
     }
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
         $c1->declinedClientsHistory = $c2;
29 29
         $c1->declinedBy = $c2;
30 30
         $c2->declinedBy = $c1;
31
-        $c2->declinedClientsHistory= $c1;
31
+        $c2->declinedClientsHistory = $c1;
32 32
 
33 33
         $this->_em->persist($c1);
34 34
         $this->_em->persist($c2);
35 35
         $this->_em->flush();
36 36
         $this->_em->clear();
37 37
 
38
-        $history = $this->_em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1')
38
+        $history = $this->_em->createQuery('SELECT h FROM '.__NAMESPACE__.'\\DDC1250ClientHistory h WHERE h.id = ?1')
39 39
                   ->setParameter(1, $c2->id)->getSingleResult();
40 40
 
41 41
         self::assertInstanceOf(DDC1250ClientHistory::class, $history);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC501Test.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $userClone = $this->_em->merge($userClone);
61 61
 
62 62
         // Back in managed world I would expect to have my phonenumbers back but they aren't!
63
-	// Remember I didn't touch (and probably didn't need) them at all while in detached mode.
63
+    // Remember I didn't touch (and probably didn't need) them at all while in detached mode.
64 64
         self::assertEquals(4, count($userClone->getPhonenumbers()), 'Phonenumbers are not available anymore');
65 65
 
66 66
         // This works fine as long as cmUser::groups doesn't cascade "merge"
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1225Test.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
     {
27 27
         $qb = $this->_em->createQueryBuilder();
28 28
         $qb->from(DDC1225_TestEntity1::class, 'te1')
29
-           ->select('te1')
30
-           ->where('te1.testEntity2 = ?1')
31
-           ->setParameter(1, 0);
29
+            ->select('te1')
30
+            ->where('te1.testEntity2 = ?1')
31
+            ->setParameter(1, 0);
32 32
 
33 33
         self::assertEquals(
34 34
             strtolower('SELECT t0_.test_entity2_id AS test_entity2_id_0 FROM te1 t0_ WHERE t0_.test_entity2_id = ?'),
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function testIndexByJoin()
72 72
     {
73 73
         $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '.
74
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
74
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
75 75
         $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
76 76
 
77 77
         self::assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books.
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
     public function testIndexByToOneJoinSilentlyIgnored()
96 96
     {
97 97
         $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
98
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
98
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
99 99
         $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
100 100
 
101 101
         self::assertInstanceOf(DDC618Book::class, $result[0]);
102 102
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
103 103
 
104 104
         $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
105
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
105
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
106 106
         $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
107 107
 
108 108
         self::assertEquals("Alice", $result[0]['author']['name']);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function testCombineIndexBy()
115 115
     {
116 116
         $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '.
117
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
117
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
118 118
         $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
119 119
 
120 120
         self::assertArrayHasKey(11, $result); // Alice
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
             $this->_em->flush();
38 38
             $this->_em->clear();
39
-        } catch(\Exception $e) {
39
+        } catch (\Exception $e) {
40 40
 
41 41
         }
42 42
     }
@@ -76,17 +76,17 @@  discard block
 block discarded – undo
76 76
 
77 77
         self::assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books.
78 78
         self::assertEquals('Alice', $result[0]->name);
79
-        self::assertTrue( isset($result[0]->books["In Wonderland"] ), "Indexing by title should have books by title.");
80
-        self::assertTrue( isset($result[0]->books["Reloaded"] ), "Indexing by title should have books by title.");
81
-        self::assertTrue( isset($result[0]->books["Test"] ), "Indexing by title should have books by title.");
79
+        self::assertTrue(isset($result[0]->books["In Wonderland"]), "Indexing by title should have books by title.");
80
+        self::assertTrue(isset($result[0]->books["Reloaded"]), "Indexing by title should have books by title.");
81
+        self::assertTrue(isset($result[0]->books["Test"]), "Indexing by title should have books by title.");
82 82
 
83 83
         $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
84 84
 
85 85
         self::assertEquals(3, count($result[0]['books'])); // Alice, Joe doesn't appear because he has no books.
86 86
         self::assertEquals('Alice', $result[0]['name']);
87
-        self::assertTrue( isset($result[0]['books']["In Wonderland"] ), "Indexing by title should have books by title.");
88
-        self::assertTrue( isset($result[0]['books']["Reloaded"] ), "Indexing by title should have books by title.");
89
-        self::assertTrue( isset($result[0]['books']["Test"] ), "Indexing by title should have books by title.");
87
+        self::assertTrue(isset($result[0]['books']["In Wonderland"]), "Indexing by title should have books by title.");
88
+        self::assertTrue(isset($result[0]['books']["Reloaded"]), "Indexing by title should have books by title.");
89
+        self::assertTrue(isset($result[0]['books']["Test"]), "Indexing by title should have books by title.");
90 90
     }
91 91
 
92 92
     /**
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 
122 122
         self::assertEquals(3, count($result[11]->books)); // Alice, Joe doesn't appear because he has no books.
123 123
         self::assertEquals('Alice', $result[11]->name);
124
-        self::assertTrue( isset($result[11]->books["In Wonderland"] ), "Indexing by title should have books by title.");
125
-        self::assertTrue( isset($result[11]->books["Reloaded"] ), "Indexing by title should have books by title.");
126
-        self::assertTrue( isset($result[11]->books["Test"] ), "Indexing by title should have books by title.");
124
+        self::assertTrue(isset($result[11]->books["In Wonderland"]), "Indexing by title should have books by title.");
125
+        self::assertTrue(isset($result[11]->books["Reloaded"]), "Indexing by title should have books by title.");
126
+        self::assertTrue(isset($result[11]->books["Test"]), "Indexing by title should have books by title.");
127 127
     }
128 128
 }
129 129
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.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
         $this->_em->flush();
36 36
 
37 37
         $query = $this->_em->createQuery('SELECT f, fl FROM Doctrine\Tests\ORM\Functional\Ticket\DDC1300Foo f JOIN f._fooLocaleRefFoo fl');
38
-        $result =  $query->getResult();
38
+        $result = $query->getResult();
39 39
 
40 40
         self::assertEquals(1, count($result));
41 41
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
         $this->_em->flush();
47 47
         $this->_em->clear();
48 48
 
49
-        $dql = "SELECT a, b, ba FROM " . __NAMESPACE__ . "\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba";
49
+        $dql = "SELECT a, b, ba FROM ".__NAMESPACE__."\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba";
50 50
         $results = $this->_em->createQuery($dql)->setMaxResults(1)->getResult();
51 51
 
52 52
         self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom);
53
-        self::assertFalse( $results[0]->entitiesB[0]->entityATo instanceof Proxy);
53
+        self::assertFalse($results[0]->entitiesB[0]->entityATo instanceof Proxy);
54 54
         self::assertInstanceOf(Collection::class, $results[0]->entitiesB[0]->entityATo->getEntitiesB());
55 55
     }
56 56
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC522Test.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $this->_em->clear();
45 45
 
46 46
         $r = $this->_em->createQuery('select ca,c from ' . DDC522Cart::class . ' ca join ca.customer c')
47
-                       ->getResult();
47
+                        ->getResult();
48 48
 
49 49
         self::assertInstanceOf(DDC522Cart::class, $r[0]);
50 50
         self::assertInstanceOf(DDC522Customer::class, $r[0]->customer);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                     $this->_em->getClassMetadata(DDC522ForeignKeyTest::class)
23 23
                 ]
24 24
             );
25
-        } catch(\Exception $e) {
25
+        } catch (\Exception $e) {
26 26
         }
27 27
     }
28 28
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $this->_em->clear();
45 45
 
46
-        $r = $this->_em->createQuery('select ca,c from ' . DDC522Cart::class . ' ca join ca.customer c')
46
+        $r = $this->_em->createQuery('select ca,c from '.DDC522Cart::class.' ca join ca.customer c')
47 47
                        ->getResult();
48 48
 
49 49
         self::assertInstanceOf(DDC522Cart::class, $r[0]);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,14 +80,14 @@
 block discarded – undo
80 80
         $this->_em->clear();
81 81
 
82 82
         // fetch-join that foreign-key/primary-key entity association
83
-        $dql = "SELECT c, p FROM " . DDC881PhoneCall::class . " c JOIN c.phonenumber p";
83
+        $dql = "SELECT c, p FROM ".DDC881PhoneCall::class." c JOIN c.phonenumber p";
84 84
         $calls = $this->_em->createQuery($dql)->getResult();
85 85
 
86 86
         self::assertEquals(2, count($calls));
87 87
         self::assertNotInstanceOf(Proxy::class, $calls[0]->getPhoneNumber());
88 88
         self::assertNotInstanceOf(Proxy::class, $calls[1]->getPhoneNumber());
89 89
 
90
-        $dql = "SELECT p, c FROM " . DDC881PhoneNumber::class . " p JOIN p.calls c";
90
+        $dql = "SELECT p, c FROM ".DDC881PhoneNumber::class." p JOIN p.calls c";
91 91
         $numbers = $this->_em->createQuery($dql)->getResult();
92 92
 
93 93
         self::assertEquals(2, count($numbers));
Please login to merge, or discard this patch.