Failed Conditions
Pull Request — master (#6593)
by Thomas
16:12
created
Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
         $this->_em->flush();
42 42
 
43 43
         $this->assertForeignKeysContain($this->firstProduct->getId(),
44
-                                   $this->firstRelated->getId());
44
+                                    $this->firstRelated->getId());
45 45
         $this->assertForeignKeysContain($this->firstProduct->getId(),
46
-                                   $this->secondRelated->getId());
46
+                                    $this->secondRelated->getId());
47 47
     }
48 48
 
49 49
     public function testRemovesAManyToManyAssociation()
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         $this->_em->flush();
57 57
 
58 58
         $this->assertForeignKeysNotContain($this->firstProduct->getId(),
59
-                                   $this->firstRelated->getId());
59
+                                    $this->firstRelated->getId());
60 60
         $this->assertForeignKeysContain($this->firstProduct->getId(),
61
-                                   $this->secondRelated->getId());
61
+                                    $this->secondRelated->getId());
62 62
     }
63 63
 
64 64
     public function testEagerLoadsOwningSide()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
  * @DiscriminatorMap({"parent" = "CTIParent", "child" = "CTIChild"})
85 85
  */
86 86
 class CTIParent {
87
-   /**
87
+    /**
88 88
      * @Id @Column(type="integer")
89 89
      * @GeneratedValue(strategy="AUTO")
90 90
      */
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
  * @Entity @Table(name="cti_children")
112 112
  */
113 113
 class CTIChild extends CTIParent {
114
-   /**
114
+    /**
115 115
      * @Column(type="string")
116 116
      */
117 117
     private $data;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function testMultiLevelUpdateAndFind()
97 97
     {
98
-    	$manager = new CompanyManager;
98
+        $manager = new CompanyManager;
99 99
         $manager->setName('Roman S. Borschel');
100 100
         $manager->setSalary(100000);
101 101
         $manager->setDepartment('IT');
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
     public function testSelfReferencingOneToOne()
145 145
     {
146
-    	$manager = new CompanyManager;
146
+        $manager = new CompanyManager;
147 147
         $manager->setName('John Smith');
148 148
         $manager->setSalary(100000);
149 149
         $manager->setDepartment('IT');
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     public function testBulkUpdateIssueDDC368()
285 285
     {
286 286
         $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
287
-                  ->execute();
287
+                    ->execute();
288 288
 
289 289
         $result = $this->_em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
290 290
                             ->getResult();
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
     public function testBulkUpdateNonScalarParameterDDC1341()
299 299
     {
300 300
         $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
301
-                  ->setParameter(0, new \DateTime())
302
-                  ->setParameter(1, 'IT')
303
-                  ->execute();
301
+                    ->setParameter(0, new \DateTime())
302
+                    ->setParameter(1, 'IT')
303
+                    ->execute();
304 304
 
305 305
         $this->addToAssertionCount(1);
306 306
     }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         $this->_em->clear();
49 49
 
50
-        $query = $this->_em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc');
50
+        $query = $this->_em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc');
51 51
 
52 52
         $entities = $query->getResult();
53 53
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         $this->_em->clear();
64 64
 
65
-        $query = $this->_em->createQuery('select p from ' . CompanyEmployee::class . ' p');
65
+        $query = $this->_em->createQuery('select p from '.CompanyEmployee::class.' p');
66 66
 
67 67
         $entities = $query->getResult();
68 68
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $this->_em->clear();
82 82
 
83
-        $query = $this->_em->createQuery("update " . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
83
+        $query = $this->_em->createQuery("update ".CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
84 84
         $query->setParameter(1, 'NewName', 'string');
85 85
         $query->setParameter(2, 'NewDepartment');
86 86
         $query->setParameter(3, 100000);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $numUpdated = $query->execute();
89 89
         $this->assertEquals(1, $numUpdated);
90 90
 
91
-        $query = $this->_em->createQuery('delete from ' . CompanyPerson::class . ' p');
91
+        $query = $this->_em->createQuery('delete from '.CompanyPerson::class.' p');
92 92
         $numDeleted = $query->execute();
93 93
         $this->assertEquals(2, $numDeleted);
94 94
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $this->_em->flush();
162 162
         $this->_em->clear();
163 163
 
164
-        $query = $this->_em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\'');
164
+        $query = $this->_em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\'');
165 165
 
166 166
         $result = $query->getResult();
167 167
         $this->assertCount(1, $result);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
         $this->_em->clear();
195 195
 
196
-        $query = $this->_em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1');
196
+        $query = $this->_em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1');
197 197
         $query->setParameter(1, 'Roman');
198 198
 
199 199
         $result = $query->getResult();
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $this->_em->flush();
256 256
         $this->_em->clear();
257 257
 
258
-        $q = $this->_em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1');
258
+        $q = $this->_em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1');
259 259
         $q->setParameter(1, $event1->getId());
260 260
 
261 261
         $result = $q->getResult();
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
         $this->_em->clear();
266 266
 
267
-        $q = $this->_em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1');
267
+        $q = $this->_em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1');
268 268
         $q->setParameter(1, $org->getId());
269 269
 
270 270
         $result = $q->getResult();
@@ -283,10 +283,10 @@  discard block
 block discarded – undo
283 283
      */
284 284
     public function testBulkUpdateIssueDDC368()
285 285
     {
286
-        $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
286
+        $this->_em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1')
287 287
                   ->execute();
288 288
 
289
-        $result = $this->_em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
289
+        $result = $this->_em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1')
290 290
                             ->getResult();
291 291
 
292 292
         $this->assertGreaterThan(0, count($result));
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
      */
298 298
     public function testBulkUpdateNonScalarParameterDDC1341()
299 299
     {
300
-        $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
300
+        $this->_em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1')
301 301
                   ->setParameter(0, new \DateTime())
302 302
                   ->setParameter(1, 'IT')
303 303
                   ->execute();
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         $this->_em->flush();
356 356
         $this->_em->clear();
357 357
 
358
-        $dqlManager = $this->_em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1')
358
+        $dqlManager = $this->_em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1')
359 359
                                 ->setParameter(1, $person->getId())
360 360
                                 ->getSingleResult();
361 361
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
     public function testAggregateWithHavingClause()
26 26
     {
27 27
         $dql = 'SELECT p.department, AVG(p.salary) AS avgSalary '.
28
-               'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
29
-               'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department';
28
+                'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
29
+                'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department';
30 30
 
31 31
         $result = $this->_em->createQuery($dql)->getScalarResult();
32 32
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
     public function testUnnamedScalarResultsAreOneBased()
41 41
     {
42 42
         $dql = 'SELECT p.department, AVG(p.salary) '.
43
-               'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
44
-               'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department';
43
+                'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
44
+                'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department';
45 45
 
46 46
         $result = $this->_em->createQuery($dql)->getScalarResult();
47 47
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
     public function testOrderByResultVariableCollectionSize()
54 54
     {
55 55
         $dql = 'SELECT p.name, size(p.friends) AS friends ' .
56
-               'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' .
57
-               'WHERE p.friends IS NOT EMPTY ' .
58
-               'ORDER BY friends DESC, p.name DESC';
56
+                'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' .
57
+                'WHERE p.friends IS NOT EMPTY ' .
58
+                'ORDER BY friends DESC, p.name DESC';
59 59
 
60 60
         $result = $this->_em->createQuery($dql)->getScalarResult();
61 61
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function testIsNullAssociation()
78 78
     {
79 79
         $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '.
80
-               'WHERE p.spouse IS NULL';
80
+                'WHERE p.spouse IS NULL';
81 81
         $result = $this->_em->createQuery($dql)->getResult();
82 82
 
83 83
         $this->assertEquals(2, count($result));
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     public function testSelectSubselect()
92 92
     {
93 93
         $dql = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName '.
94
-               'FROM Doctrine\Tests\Models\Company\CompanyManager p';
94
+                'FROM Doctrine\Tests\Models\Company\CompanyManager p';
95 95
         $result = $this->_em->createQuery($dql)->getArrayResult();
96 96
 
97 97
         $this->assertEquals(1, count($result));
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public function testInSubselect()
102 102
     {
103 103
         $dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ".
104
-               "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')";
104
+                "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')";
105 105
         $result = $this->_em->createQuery($dql)->getScalarResult();
106 106
 
107 107
         $this->assertEquals(1, count($result));
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function testGroupByMultipleFields()
112 112
     {
113 113
         $dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
114
-               'GROUP BY p.department, p.name';
114
+                'GROUP BY p.department, p.name';
115 115
         $result = $this->_em->createQuery($dql)->getResult();
116 116
 
117 117
         $this->assertEquals(4, count($result));
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@
 block discarded – undo
52 52
 
53 53
     public function testOrderByResultVariableCollectionSize()
54 54
     {
55
-        $dql = 'SELECT p.name, size(p.friends) AS friends ' .
56
-               'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' .
57
-               'WHERE p.friends IS NOT EMPTY ' .
55
+        $dql = 'SELECT p.name, size(p.friends) AS friends '.
56
+               'FROM Doctrine\Tests\Models\Company\CompanyPerson p '.
57
+               'WHERE p.friends IS NOT EMPTY '.
58 58
                'ORDER BY friends DESC, p.name DESC';
59 59
 
60 60
         $result = $this->_em->createQuery($dql)->getScalarResult();
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         try {
77 77
             // exception depending on the underlying Database Driver
78 78
             $this->_em->flush();
79
-        } catch(\Exception $e) {
79
+        } catch (\Exception $e) {
80 80
             $exceptionThrown = true;
81 81
         }
82 82
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/EntityListenersTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
         $fix = new CompanyFixContract();
36 36
         $fix->setFixPrice(2000);
37 37
 
38
-        $this->listener->preFlushCalls  = [];
38
+        $this->listener->preFlushCalls = [];
39 39
 
40 40
         $this->_em->persist($fix);
41 41
         $this->_em->flush();
42 42
 
43
-        $this->assertCount(1,$this->listener->preFlushCalls);
43
+        $this->assertCount(1, $this->listener->preFlushCalls);
44 44
         $this->assertSame($fix, $this->listener->preFlushCalls[0][0]);
45 45
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->preFlushCalls[0][0]);
46 46
         $this->assertInstanceOf(PreFlushEventArgs::class, $this->listener->preFlushCalls[0][1]);
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
         $this->_em->flush();
56 56
         $this->_em->clear();
57 57
 
58
-        $this->listener->postLoadCalls  = [];
58
+        $this->listener->postLoadCalls = [];
59 59
 
60 60
         $dql = "SELECT f FROM Doctrine\Tests\Models\Company\CompanyFixContract f WHERE f.id = ?1";
61 61
         $fix = $this->_em->createQuery($dql)->setParameter(1, $fix->getId())->getSingleResult();
62 62
 
63
-        $this->assertCount(1,$this->listener->postLoadCalls);
63
+        $this->assertCount(1, $this->listener->postLoadCalls);
64 64
         $this->assertSame($fix, $this->listener->postLoadCalls[0][0]);
65 65
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->postLoadCalls[0][0]);
66 66
         $this->assertInstanceOf(LifecycleEventArgs::class, $this->listener->postLoadCalls[0][1]);
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
         $fix = new CompanyFixContract();
72 72
         $fix->setFixPrice(2000);
73 73
 
74
-        $this->listener->prePersistCalls  = [];
74
+        $this->listener->prePersistCalls = [];
75 75
 
76 76
         $this->_em->persist($fix);
77 77
         $this->_em->flush();
78 78
 
79
-        $this->assertCount(1,$this->listener->prePersistCalls);
79
+        $this->assertCount(1, $this->listener->prePersistCalls);
80 80
         $this->assertSame($fix, $this->listener->prePersistCalls[0][0]);
81 81
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->prePersistCalls[0][0]);
82 82
         $this->assertInstanceOf(LifecycleEventArgs::class, $this->listener->prePersistCalls[0][1]);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $this->_em->persist($fix);
93 93
         $this->_em->flush();
94 94
 
95
-        $this->assertCount(1,$this->listener->postPersistCalls);
95
+        $this->assertCount(1, $this->listener->postPersistCalls);
96 96
         $this->assertSame($fix, $this->listener->postPersistCalls[0][0]);
97 97
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->postPersistCalls[0][0]);
98 98
         $this->assertInstanceOf(LifecycleEventArgs::class, $this->listener->postPersistCalls[0][1]);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->_em->persist($fix);
114 114
         $this->_em->flush();
115 115
 
116
-        $this->assertCount(1,$this->listener->preUpdateCalls);
116
+        $this->assertCount(1, $this->listener->preUpdateCalls);
117 117
         $this->assertSame($fix, $this->listener->preUpdateCalls[0][0]);
118 118
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->preUpdateCalls[0][0]);
119 119
         $this->assertInstanceOf(PreUpdateEventArgs::class, $this->listener->preUpdateCalls[0][1]);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $this->_em->persist($fix);
135 135
         $this->_em->flush();
136 136
 
137
-        $this->assertCount(1,$this->listener->postUpdateCalls);
137
+        $this->assertCount(1, $this->listener->postUpdateCalls);
138 138
         $this->assertSame($fix, $this->listener->postUpdateCalls[0][0]);
139 139
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->postUpdateCalls[0][0]);
140 140
         $this->assertInstanceOf(LifecycleEventArgs::class, $this->listener->postUpdateCalls[0][1]);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $this->_em->remove($fix);
154 154
         $this->_em->flush();
155 155
 
156
-        $this->assertCount(1,$this->listener->preRemoveCalls);
156
+        $this->assertCount(1, $this->listener->preRemoveCalls);
157 157
         $this->assertSame($fix, $this->listener->preRemoveCalls[0][0]);
158 158
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->preRemoveCalls[0][0]);
159 159
         $this->assertInstanceOf(LifecycleEventArgs::class, $this->listener->preRemoveCalls[0][1]);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $this->_em->remove($fix);
173 173
         $this->_em->flush();
174 174
 
175
-        $this->assertCount(1,$this->listener->postRemoveCalls);
175
+        $this->assertCount(1, $this->listener->postRemoveCalls);
176 176
         $this->assertSame($fix, $this->listener->postRemoveCalls[0][0]);
177 177
         $this->assertInstanceOf(CompanyFixContract::class, $this->listener->postRemoveCalls[0][0]);
178 178
         $this->assertInstanceOf(LifecycleEventArgs::class, $this->listener->postRemoveCalls[0][1]);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $this->putTripAroundEurope();
110 110
 
111 111
         $dql = 'SELECT t, p, c FROM Doctrine\Tests\Models\Navigation\NavTour t ' .
112
-               'INNER JOIN t.pois p INNER JOIN p.country c';
112
+                'INNER JOIN t.pois p INNER JOIN p.country c';
113 113
         $tours = $this->_em->createQuery($dql)->getResult();
114 114
 
115 115
         $this->assertEquals(1, count($tours));
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
         $this->putTripAroundEurope();
129 129
 
130 130
         $dql = 'SELECT t FROM Doctrine\Tests\Models\Navigation\NavTour t, Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' .
131
-               'WHERE p MEMBER OF t.pois';
131
+                'WHERE p MEMBER OF t.pois';
132 132
         $tours = $this->_em->createQuery($dql)
133
-                           ->getResult();
133
+                            ->getResult();
134 134
 
135 135
         $this->assertEquals(1, count($tours));
136 136
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $this->putGermanysBrandenburderTor();
109 109
         $this->putTripAroundEurope();
110 110
 
111
-        $dql = 'SELECT t, p, c FROM Doctrine\Tests\Models\Navigation\NavTour t ' .
111
+        $dql = 'SELECT t, p, c FROM Doctrine\Tests\Models\Navigation\NavTour t '.
112 112
                'INNER JOIN t.pois p INNER JOIN p.country c';
113 113
         $tours = $this->_em->createQuery($dql)->getResult();
114 114
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $this->putGermanysBrandenburderTor();
128 128
         $this->putTripAroundEurope();
129 129
 
130
-        $dql = 'SELECT t FROM Doctrine\Tests\Models\Navigation\NavTour t, Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' .
130
+        $dql = 'SELECT t FROM Doctrine\Tests\Models\Navigation\NavTour t, Doctrine\Tests\Models\Navigation\NavPointOfInterest p '.
131 131
                'WHERE p MEMBER OF t.pois';
132 132
         $tours = $this->_em->createQuery($dql)
133 133
                            ->getResult();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function testAggregateSum()
24 24
     {
25 25
         $salarySum = $this->_em->createQuery('SELECT SUM(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
26
-                               ->getSingleResult();
26
+                                ->getSingleResult();
27 27
 
28 28
         $this->assertEquals(1500000, $salarySum['salary']);
29 29
     }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function testAggregateAvg()
32 32
     {
33 33
         $salaryAvg = $this->_em->createQuery('SELECT AVG(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
34
-                               ->getSingleResult();
34
+                                ->getSingleResult();
35 35
 
36 36
         $this->assertEquals(375000, round($salaryAvg['salary'], 0));
37 37
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function testAggregateMin()
40 40
     {
41 41
         $salary = $this->_em->createQuery('SELECT MIN(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
42
-                               ->getSingleResult();
42
+                                ->getSingleResult();
43 43
 
44 44
         $this->assertEquals(100000, $salary['salary']);
45 45
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function testAggregateMax()
48 48
     {
49 49
         $salary = $this->_em->createQuery('SELECT MAX(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
50
-                               ->getSingleResult();
50
+                                ->getSingleResult();
51 51
 
52 52
         $this->assertEquals(800000, $salary['salary']);
53 53
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function testAggregateCount()
56 56
     {
57 57
         $managerCount = $this->_em->createQuery('SELECT COUNT(m.id) AS managers FROM Doctrine\Tests\Models\Company\CompanyManager m')
58
-                               ->getSingleResult();
58
+                                ->getSingleResult();
59 59
 
60 60
         $this->assertEquals(4, $managerCount['managers']);
61 61
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function testFunctionAbs()
64 64
     {
65 65
         $result = $this->_em->createQuery('SELECT m, ABS(m.salary * -1) AS abs FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC')
66
-                         ->getResult();
66
+                            ->getResult();
67 67
 
68 68
         $this->assertEquals(4, count($result));
69 69
         $this->assertEquals(100000, $result[0]['abs']);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function testFunctionConcat()
76 76
     {
77 77
         $arg = $this->_em->createQuery('SELECT m, CONCAT(m.name, m.department) AS namedep FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC')
78
-                         ->getArrayResult();
78
+                            ->getArrayResult();
79 79
 
80 80
         $this->assertEquals(4, count($arg));
81 81
         $this->assertEquals('Roman B.IT', $arg[0]['namedep']);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function testFunctionLength()
88 88
     {
89 89
         $result = $this->_em->createQuery('SELECT m, LENGTH(CONCAT(m.name, m.department)) AS namedeplength FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC')
90
-                         ->getArrayResult();
90
+                            ->getArrayResult();
91 91
 
92 92
         $this->assertEquals(4, count($result));
93 93
         $this->assertEquals(10, $result[0]['namedeplength']);
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
     public function testFunctionLocate()
100 100
     {
101 101
         $dql = "SELECT m, LOCATE('e', LOWER(m.name)) AS loc, LOCATE('e', LOWER(m.name), 7) AS loc2 ".
102
-               "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
102
+                "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
103 103
 
104 104
         $result = $this->_em->createQuery($dql)
105
-                         ->getArrayResult();
105
+                            ->getArrayResult();
106 106
 
107 107
         $this->assertEquals(4, count($result));
108 108
         $this->assertEquals(0, $result[0]['loc']);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public function testFunctionLower()
119 119
     {
120 120
         $result = $this->_em->createQuery("SELECT m, LOWER(m.name) AS lowername FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
121
-                         ->getArrayResult();
121
+                            ->getArrayResult();
122 122
 
123 123
         $this->assertEquals(4, count($result));
124 124
         $this->assertEquals('roman b.', $result[0]['lowername']);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function testFunctionMod()
131 131
     {
132 132
         $result = $this->_em->createQuery("SELECT m, MOD(m.salary, 3500) AS amod FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
133
-                         ->getArrayResult();
133
+                            ->getArrayResult();
134 134
 
135 135
         $this->assertEquals(4, count($result));
136 136
         $this->assertEquals(2000, $result[0]['amod']);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function testFunctionSqrt()
143 143
     {
144 144
         $result = $this->_em->createQuery("SELECT m, SQRT(m.salary) AS sqrtsalary FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
145
-                         ->getArrayResult();
145
+                            ->getArrayResult();
146 146
 
147 147
         $this->assertEquals(4, count($result));
148 148
         $this->assertEquals(316, round($result[0]['sqrtsalary']));
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     public function testFunctionUpper()
155 155
     {
156 156
         $result = $this->_em->createQuery("SELECT m, UPPER(m.name) AS uppername FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
157
-                         ->getArrayResult();
157
+                            ->getArrayResult();
158 158
 
159 159
         $this->assertEquals(4, count($result));
160 160
         $this->assertEquals('ROMAN B.', $result[0]['uppername']);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.name";
170 170
 
171 171
         $result = $this->_em->createQuery($dql)
172
-                         ->getArrayResult();
172
+                            ->getArrayResult();
173 173
 
174 174
         $this->assertEquals(4, count($result));
175 175
         $this->assertEquals('Ben', $result[0]['str1']);
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
     public function testFunctionTrim()
187 187
     {
188 188
         $dql = "SELECT m, TRIM(TRAILING '.' FROM m.name) AS str1, ".
189
-               " TRIM(LEADING '.' FROM m.name) AS str2, TRIM(CONCAT(' ', CONCAT(m.name, ' '))) AS str3 ".
190
-               "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
189
+                " TRIM(LEADING '.' FROM m.name) AS str2, TRIM(CONCAT(' ', CONCAT(m.name, ' '))) AS str3 ".
190
+                "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
191 191
 
192 192
         $result = $this->_em->createQuery($dql)->getArrayResult();
193 193
 
@@ -359,8 +359,8 @@  discard block
 block discarded – undo
359 359
     }
360 360
 
361 361
     /**
362
-    * @group DDC-1213
363
-    */
362
+     * @group DDC-1213
363
+     */
364 364
     public function testBitAndComparison()
365 365
     {
366 366
         $dql    = 'SELECT m, ' .
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
         $this->assertEquals(4, count($result));
148 148
         $this->assertEquals(316, round($result[0]['sqrtsalary']));
149
-        $this->assertEquals(447,  round($result[1]['sqrtsalary']));
149
+        $this->assertEquals(447, round($result[1]['sqrtsalary']));
150 150
         $this->assertEquals(632, round($result[2]['sqrtsalary']));
151 151
         $this->assertEquals(894, round($result[3]['sqrtsalary']));
152 152
     }
@@ -339,12 +339,12 @@  discard block
 block discarded – undo
339 339
      */
340 340
     public function testBitOrComparison()
341 341
     {
342
-        $dql    = 'SELECT m, ' .
343
-                    'BIT_OR(4, 2) AS bit_or,' .
344
-                    'BIT_OR( (m.salary/100000) , 2 ) AS salary_bit_or ' .
345
-                    'FROM Doctrine\Tests\Models\Company\CompanyManager m ' .
346
-                'ORDER BY ' .
347
-                    'm.id ' ;
342
+        $dql = 'SELECT m, '.
343
+                    'BIT_OR(4, 2) AS bit_or,'.
344
+                    'BIT_OR( (m.salary/100000) , 2 ) AS salary_bit_or '.
345
+                    'FROM Doctrine\Tests\Models\Company\CompanyManager m '.
346
+                'ORDER BY '.
347
+                    'm.id ';
348 348
         $result = $this->_em->createQuery($dql)->getArrayResult();
349 349
 
350 350
         $this->assertEquals(4 | 2, $result[0]['bit_or']);
@@ -352,10 +352,10 @@  discard block
 block discarded – undo
352 352
         $this->assertEquals(4 | 2, $result[2]['bit_or']);
353 353
         $this->assertEquals(4 | 2, $result[3]['bit_or']);
354 354
 
355
-        $this->assertEquals(($result[0][0]['salary']/100000) | 2, $result[0]['salary_bit_or']);
356
-        $this->assertEquals(($result[1][0]['salary']/100000) | 2, $result[1]['salary_bit_or']);
357
-        $this->assertEquals(($result[2][0]['salary']/100000) | 2, $result[2]['salary_bit_or']);
358
-        $this->assertEquals(($result[3][0]['salary']/100000) | 2, $result[3]['salary_bit_or']);
355
+        $this->assertEquals(($result[0][0]['salary'] / 100000) | 2, $result[0]['salary_bit_or']);
356
+        $this->assertEquals(($result[1][0]['salary'] / 100000) | 2, $result[1]['salary_bit_or']);
357
+        $this->assertEquals(($result[2][0]['salary'] / 100000) | 2, $result[2]['salary_bit_or']);
358
+        $this->assertEquals(($result[3][0]['salary'] / 100000) | 2, $result[3]['salary_bit_or']);
359 359
     }
360 360
 
361 361
     /**
@@ -363,12 +363,12 @@  discard block
 block discarded – undo
363 363
     */
364 364
     public function testBitAndComparison()
365 365
     {
366
-        $dql    = 'SELECT m, ' .
367
-                    'BIT_AND(4, 2) AS bit_and,' .
368
-                    'BIT_AND( (m.salary/100000) , 2 ) AS salary_bit_and ' .
369
-                    'FROM Doctrine\Tests\Models\Company\CompanyManager m ' .
370
-                'ORDER BY ' .
371
-                    'm.id ' ;
366
+        $dql = 'SELECT m, '.
367
+                    'BIT_AND(4, 2) AS bit_and,'.
368
+                    'BIT_AND( (m.salary/100000) , 2 ) AS salary_bit_and '.
369
+                    'FROM Doctrine\Tests\Models\Company\CompanyManager m '.
370
+                'ORDER BY '.
371
+                    'm.id ';
372 372
         $result = $this->_em->createQuery($dql)->getArrayResult();
373 373
 
374 374
         $this->assertEquals(4 & 2, $result[0]['bit_and']);
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
         $this->assertEquals(4 & 2, $result[2]['bit_and']);
377 377
         $this->assertEquals(4 & 2, $result[3]['bit_and']);
378 378
 
379
-        $this->assertEquals(($result[0][0]['salary']/100000) & 2, $result[0]['salary_bit_and']);
380
-        $this->assertEquals(($result[1][0]['salary']/100000) & 2, $result[1]['salary_bit_and']);
381
-        $this->assertEquals(($result[2][0]['salary']/100000) & 2, $result[2]['salary_bit_and']);
382
-        $this->assertEquals(($result[3][0]['salary']/100000) & 2, $result[3]['salary_bit_and']);
379
+        $this->assertEquals(($result[0][0]['salary'] / 100000) & 2, $result[0]['salary_bit_and']);
380
+        $this->assertEquals(($result[1][0]['salary'] / 100000) & 2, $result[1]['salary_bit_and']);
381
+        $this->assertEquals(($result[2][0]['salary'] / 100000) & 2, $result[2]['salary_bit_and']);
382
+        $this->assertEquals(($result[3][0]['salary'] / 100000) & 2, $result[3]['salary_bit_and']);
383 383
     }
384 384
 
385 385
     protected function generateFixture()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -207,13 +207,13 @@
 block discarded – undo
207 207
 
208 208
         $q = $this->_em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm);
209 209
         $q2 = $q->setSQL('foo')
210
-          ->setResultSetMapping($rsm)
211
-          ->expireResultCache(true)
212
-          ->setHint('foo', 'bar')
213
-          ->setParameter(1, 'foo')
214
-          ->setParameters($parameters)
215
-          ->setResultCacheDriver(null)
216
-          ->setResultCacheLifetime(3500);
210
+            ->setResultSetMapping($rsm)
211
+            ->expireResultCache(true)
212
+            ->setHint('foo', 'bar')
213
+            ->setParameter(1, 'foo')
214
+            ->setParameters($parameters)
215
+            ->setResultCacheDriver(null)
216
+            ->setResultCacheLifetime(3500);
217 217
 
218 218
         $this->assertSame($q, $q2);
219 219
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -401,8 +401,8 @@  discard block
 block discarded – undo
401 401
 
402 402
         $this->assertCount(1, $result);
403 403
         $this->assertInstanceOf(CmsAddress::class, $result[0]);
404
-        $this->assertEquals($addr->id,  $result[0]->id);
405
-        $this->assertEquals($addr->city,  $result[0]->city);
404
+        $this->assertEquals($addr->id, $result[0]->id);
405
+        $this->assertEquals($addr->city, $result[0]->city);
406 406
         $this->assertEquals($addr->country, $result[0]->country);
407 407
     }
408 408
 
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         $repository = $this->_em->getRepository(CmsUser::class);
566 566
 
567 567
         $result = $repository->createNativeNamedQuery('fetchUserPhonenumberCount')
568
-                        ->setParameter(1, ['test','FabioBatSilva'])->getResult();
568
+                        ->setParameter(1, ['test', 'FabioBatSilva'])->getResult();
569 569
 
570 570
         $this->assertEquals(2, count($result));
571 571
         $this->assertTrue(is_array($result[0]));
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
         $rsm = new ResultSetMappingBuilder($this->_em, ResultSetMappingBuilder::COLUMN_RENAMING_INCREMENT);
799 799
         $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u');
800 800
 
801
-        $this->assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string)$rsm);
801
+        $this->assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string) $rsm);
802 802
     }
803 803
 
804 804
     /**
Please login to merge, or discard this patch.