Failed Conditions
Pull Request — master (#6762)
by Claudio
19:02
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         // proxy for Y is in identity map
46 46
 
47
-        $z2 = $this->_em->createQuery('select z,y from ' . get_class($z) . ' z join z.y y where z.id = ?1')
47
+        $z2 = $this->_em->createQuery('select z,y from '.get_class($z).' z join z.y y where z.id = ?1')
48 48
                 ->setParameter(1, $z->id)
49 49
                 ->getSingleResult();
50 50
         self::assertInstanceOf(Proxy::class, $z2->y);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1695Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         if ($this->_em->getConnection()->getDatabasePlatform()->getName() != "sqlite") {
13 13
             $this->markTestSkipped("Only with sqlite");
14 14
         }
15
-        $dql = "SELECT n.smallText, n.publishDate FROM " . __NAMESPACE__ . "\\DDC1695News n";
15
+        $dql = "SELECT n.smallText, n.publishDate FROM ".__NAMESPACE__."\\DDC1695News n";
16 16
         $sql = $this->_em->createQuery($dql)->getSQL();
17 17
 
18 18
         self::assertEquals(
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
                 $this->_em->getClassMetadata(DDC1655Baz::class),
22 22
                 ]
23 23
             );
24
-        } catch(\Exception $e) {
24
+        } catch (\Exception $e) {
25 25
         }
26 26
     }
27 27
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         $baz = $this->_em->find(get_class($baz), $baz->id);
49 49
         foreach ($baz->foos as $foo) {
50
-            self::assertEquals(1, $foo->loaded, "should have loaded callback counter incremented for " . get_class($foo));
50
+            self::assertEquals(1, $foo->loaded, "should have loaded callback counter incremented for ".get_class($foo));
51 51
         }
52 52
     }
53 53
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         self::assertEquals(1, $bar->loaded);
72 72
         self::assertEquals(1, $bar->subLoaded);
73 73
 
74
-        $dql = "SELECT b FROM " . __NAMESPACE__ . "\DDC1655Bar b WHERE b.id = ?1";
74
+        $dql = "SELECT b FROM ".__NAMESPACE__."\DDC1655Bar b WHERE b.id = ?1";
75 75
         $bar = $this->_em->createQuery($dql)->setParameter(1, $bar->id)->getSingleResult();
76 76
 
77 77
         self::assertEquals(1, $bar->loaded);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         // Checks sequence name validity
56 56
         self::assertEquals(
57
-            $fullTableName . '_' . $classMetadata->getSingleIdentifierColumnName() . '_seq',
57
+            $fullTableName.'_'.$classMetadata->getSingleIdentifierColumnName().'_seq',
58 58
             $classMetadata->getSequenceName($platform)
59 59
         );
60 60
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC633Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
                 $this->_em->getClassMetadata(DDC633Appointment::class),
17 17
                 ]
18 18
             );
19
-        } catch(\Exception $e) {
19
+        } catch (\Exception $e) {
20 20
 
21 21
         }
22 22
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $this->_em->flush();
64 64
         $this->_em->clear();
65 65
 
66
-        $appointments = $this->_em->createQuery("SELECT a FROM " . __NAMESPACE__ . "\DDC633Appointment a")->getResult();
66
+        $appointments = $this->_em->createQuery("SELECT a FROM ".__NAMESPACE__."\DDC633Appointment a")->getResult();
67 67
 
68 68
         foreach ($appointments AS $eagerAppointment) {
69 69
             self::assertInstanceOf(Proxy::class, $eagerAppointment->patient);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
         self::assertInstanceOf(Lemma::class, $lemma);
87 87
         $relations = $lemma->getRelations();
88 88
 
89
-        foreach($relations as $relation) {
89
+        foreach ($relations as $relation) {
90 90
             self::assertInstanceOf(Relation::class, $relation);
91 91
             self::assertTrue($relation->getType()->getType() != '');
92 92
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
 
36 36
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author";
37 37
         $this->_em->createQuery($dql)
38
-                  ->setParameter('author', $user)
39
-                  ->getResult();
38
+                    ->setParameter('author', $user)
39
+                    ->getResult();
40 40
 
41 41
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author AND a.user = :author";
42 42
         $this->_em->createQuery($dql)
43
-                  ->setParameter('author', $user)
44
-                  ->getResult();
43
+                    ->setParameter('author', $user)
44
+                    ->getResult();
45 45
 
46 46
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author";
47 47
         $farticle = $this->_em->createQuery($dql)
48
-                  ->setParameter('author', $user)
49
-                  ->setParameter('topic', 'This is John Galt speaking!')
50
-                  ->getSingleResult();
48
+                    ->setParameter('author', $user)
49
+                    ->setParameter('topic', 'This is John Galt speaking!')
50
+                    ->getSingleResult();
51 51
 
52 52
         self::assertSame($article, $farticle);
53 53
     }
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
 
71 71
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3";
72 72
         $farticle = $this->_em->createQuery($dql)
73
-                  ->setParameter(1, 'This is John Galt speaking!')
74
-                  ->setParameter(2, $user)
75
-                  ->setParameter(3, $user)
76
-                  ->getSingleResult();
73
+                    ->setParameter(1, 'This is John Galt speaking!')
74
+                    ->setParameter(2, $user)
75
+                    ->setParameter(3, $user)
76
+                    ->getSingleResult();
77 77
 
78 78
         self::assertSame($article, $farticle);
79 79
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1335Test.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
                 ]
19 19
             );
20 20
             $this->loadFixture();
21
-        } catch(\Exception $e) {
21
+        } catch (\Exception $e) {
22 22
         }
23 23
     }
24 24
 
25 25
 
26 26
     public function testDql()
27 27
     {
28
-        $dql      = 'SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.id';
28
+        $dql      = 'SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.id';
29 29
         $query    = $this->_em->createQuery($dql);
30 30
         $result   = $query->getResult();
31 31
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         self::assertArrayHasKey(2, $result);
35 35
         self::assertArrayHasKey(3, $result);
36 36
 
37
-        $dql      = 'SELECT u, p FROM '.__NAMESPACE__ . '\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id';
37
+        $dql      = 'SELECT u, p FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id';
38 38
         $query    = $this->_em->createQuery($dql);
39 39
         $result   = $query->getResult();
40 40
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         self::assertArrayHasKey(1, $result);
77 77
         self::assertArrayHasKey(2, $result);
78 78
         self::assertArrayHasKey(3, $result);
79
-        self::assertEquals('SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.id', $dql);
79
+        self::assertEquals('SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.id', $dql);
80 80
     }
81 81
 
82 82
     public function testIndexByUnique()
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
         self::assertArrayHasKey('[email protected]', $result);
92 92
         self::assertArrayHasKey('[email protected]', $result);
93 93
         self::assertArrayHasKey('[email protected]', $result);
94
-        self::assertEquals('SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email', $dql);
94
+        self::assertEquals('SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email', $dql);
95 95
     }
96 96
 
97 97
     public function  testIndexWithJoin()
98 98
     {
99 99
         $builder = $this->_em->createQueryBuilder();
100
-        $builder->select('u','p')
100
+        $builder->select('u', 'p')
101 101
                 ->from(DDC1335User::class, 'u', 'u.email')
102 102
                 ->join('u.phones', 'p', null, null, 'p.id');
103 103
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
         self::assertArrayHasKey(8, $result['[email protected]']->phones->toArray());
126 126
         self::assertArrayHasKey(9, $result['[email protected]']->phones->toArray());
127 127
 
128
-        self::assertEquals('SELECT u, p FROM '.__NAMESPACE__ . '\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id', $dql);
128
+        self::assertEquals('SELECT u, p FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id', $dql);
129 129
     }
130 130
 
131 131
     private function loadFixture()
132 132
     {
133
-        $p1 = ['11 xxxx-xxxx','11 yyyy-yyyy','11 zzzz-zzzz'];
134
-        $p2 = ['22 xxxx-xxxx','22 yyyy-yyyy','22 zzzz-zzzz'];
135
-        $p3 = ['33 xxxx-xxxx','33 yyyy-yyyy','33 zzzz-zzzz'];
133
+        $p1 = ['11 xxxx-xxxx', '11 yyyy-yyyy', '11 zzzz-zzzz'];
134
+        $p2 = ['22 xxxx-xxxx', '22 yyyy-yyyy', '22 zzzz-zzzz'];
135
+        $p3 = ['33 xxxx-xxxx', '33 yyyy-yyyy', '33 zzzz-zzzz'];
136 136
 
137
-        $u1 = new DDC1335User("[email protected]", "Foo",$p1);
138
-        $u2 = new DDC1335User("[email protected]", "Bar",$p2);
139
-        $u3 = new DDC1335User("[email protected]", "Foo Bar",$p3);
137
+        $u1 = new DDC1335User("[email protected]", "Foo", $p1);
138
+        $u2 = new DDC1335User("[email protected]", "Bar", $p2);
139
+        $u3 = new DDC1335User("[email protected]", "Foo Bar", $p3);
140 140
 
141 141
         $this->_em->persist($u1);
142 142
         $this->_em->persist($u2);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $this->phones = new \Doctrine\Common\Collections\ArrayCollection();
181 181
 
182 182
         foreach ($numbers as $number) {
183
-            $this->phones->add(new DDC1335Phone($this,$number));
183
+            $this->phones->add(new DDC1335Phone($this, $number));
184 184
         }
185 185
     }
186 186
 }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
     public function __construct($user, $number)
212 212
     {
213
-        $this->user     = $user;
214
-        $this->numericalValue   = $number;
213
+        $this->user = $user;
214
+        $this->numericalValue = $number;
215 215
     }
216 216
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2084Test.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
         try {
15 15
             $this->_schemaTool->createSchema(
16 16
                 [
17
-                $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC2084\MyEntity1'),
18
-                $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC2084\MyEntity2'),
17
+                $this->_em->getClassMetadata(__NAMESPACE__.'\DDC2084\MyEntity1'),
18
+                $this->_em->getClassMetadata(__NAMESPACE__.'\DDC2084\MyEntity2'),
19 19
                 ]
20 20
             );
21 21
         } catch (\Exception $exc) {
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $e1 = $this->loadFixture();
44 44
         $e2 = $e1->getMyEntity2();
45
-        $e  = $this->_em->find(__NAMESPACE__ . '\DDC2084\MyEntity1', $e2);
45
+        $e  = $this->_em->find(__NAMESPACE__.'\DDC2084\MyEntity1', $e2);
46 46
 
47
-        self::assertInstanceOf(__NAMESPACE__ . '\DDC2084\MyEntity1', $e);
48
-        self::assertInstanceOf(__NAMESPACE__ . '\DDC2084\MyEntity2', $e->getMyEntity2());
47
+        self::assertInstanceOf(__NAMESPACE__.'\DDC2084\MyEntity1', $e);
48
+        self::assertInstanceOf(__NAMESPACE__.'\DDC2084\MyEntity2', $e->getMyEntity2());
49 49
         self::assertEquals('Foo', $e->getMyEntity2()->getValue());
50 50
     }
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function testinvalidIdentifierBindingEntityException()
57 57
     {
58
-        $this->_em->find(__NAMESPACE__ . '\DDC2084\MyEntity1', new DDC2084\MyEntity2('Foo'));
58
+        $this->_em->find(__NAMESPACE__.'\DDC2084\MyEntity1', new DDC2084\MyEntity2('Foo'));
59 59
     }
60 60
 }
61 61
 
Please login to merge, or discard this patch.