Passed
Pull Request — master (#7230)
by Grégoire
16:18
created
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToOneTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
         $this->assertNull($this->cache->getEntityCacheRegion(ComplexAction::class));
215 215
         $this->assertInstanceOf(Region::class, $this->cache->getEntityCacheRegion(Token::class));
216 216
 
217
-        $token  = new Token('token-hash');
217
+        $token = new Token('token-hash');
218 218
 
219 219
         $action1 = new Action('login');
220 220
         $action2 = new Action('logout');
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PaginationTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $iter = $paginator->getIterator();
130 130
         $this->assertCount(9, $iter);
131 131
         $result = iterator_to_array($iter);
132
-        $this->assertEquals($checkField . "0", $result[0]->$checkField);
132
+        $this->assertEquals($checkField."0", $result[0]->$checkField);
133 133
     }
134 134
 
135 135
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $iter = $paginator->getIterator();
146 146
         $this->assertCount(3, $iter);
147 147
         $result = iterator_to_array($iter);
148
-        $this->assertEquals($checkField . "0", $result[0]->$checkField);
148
+        $this->assertEquals($checkField."0", $result[0]->$checkField);
149 149
     }
150 150
 
151 151
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $iter = $paginator->getIterator();
162 162
         $this->assertCount(3, $iter);
163 163
         $result = iterator_to_array($iter);
164
-        $this->assertEquals($checkField . "3", $result[0]->$checkField);
164
+        $this->assertEquals($checkField."3", $result[0]->$checkField);
165 165
     }
166 166
 
167 167
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $iter = $paginator->getIterator();
175 175
         $this->assertCount(9, $iter);
176 176
         $result = iterator_to_array($iter);
177
-        $this->assertEquals($checkField . "8", $result[0]->$checkField);
177
+        $this->assertEquals($checkField."8", $result[0]->$checkField);
178 178
     }
179 179
 
180 180
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $iter = $paginator->getIterator();
190 190
         $this->assertCount(3, $iter);
191 191
         $result = iterator_to_array($iter);
192
-        $this->assertEquals($checkField . "8", $result[0]->$checkField);
192
+        $this->assertEquals($checkField."8", $result[0]->$checkField);
193 193
     }
194 194
 
195 195
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $iter = $paginator->getIterator();
205 205
         $this->assertCount(3, $iter);
206 206
         $result = iterator_to_array($iter);
207
-        $this->assertEquals($checkField . "5", $result[0]->$checkField);
207
+        $this->assertEquals($checkField."5", $result[0]->$checkField);
208 208
     }
209 209
 
210 210
     /**
@@ -477,8 +477,8 @@  discard block
 block discarded – undo
477 477
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBoth($useOutputWalkers)
478 478
     {
479 479
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
480
-        $dqlAsc = $dql . " ASC, d.name";
481
-        $dqlDesc = $dql . " DESC, d.name";
480
+        $dqlAsc = $dql." ASC, d.name";
481
+        $dqlDesc = $dql." DESC, d.name";
482 482
         $this->iterateWithOrderAsc($useOutputWalkers, true, $dqlAsc, "name");
483 483
         $this->iterateWithOrderDesc($useOutputWalkers, true, $dqlDesc, "name");
484 484
     }
@@ -486,8 +486,8 @@  discard block
 block discarded – undo
486 486
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBothWithLimitWithOutputWalker()
487 487
     {
488 488
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
489
-        $dqlAsc = $dql . " ASC, d.name";
490
-        $dqlDesc = $dql . " DESC, d.name";
489
+        $dqlAsc = $dql." ASC, d.name";
490
+        $dqlDesc = $dql." DESC, d.name";
491 491
         $this->iterateWithOrderAscWithLimit(true, true, $dqlAsc, "name");
492 492
         $this->iterateWithOrderDescWithLimit(true, true, $dqlDesc, "name");
493 493
     }
@@ -498,8 +498,8 @@  discard block
 block discarded – undo
498 498
         $this->expectExceptionMessage('Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers.');
499 499
 
500 500
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
501
-        $dqlAsc = $dql . " ASC, d.name";
502
-        $dqlDesc = $dql . " DESC, d.name";
501
+        $dqlAsc = $dql." ASC, d.name";
502
+        $dqlDesc = $dql." DESC, d.name";
503 503
         $this->iterateWithOrderAscWithLimit(false, true, $dqlAsc, "name");
504 504
         $this->iterateWithOrderDescWithLimit(false, true, $dqlDesc, "name");
505 505
     }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
         $users = iterator_to_array($paginator->getIterator());
584 584
         $this->assertCount(9, $users);
585 585
         foreach ($users as $i => $user) {
586
-            $this->assertEquals("username" . (8 - $i), $user->username);
586
+            $this->assertEquals("username".(8 - $i), $user->username);
587 587
         }
588 588
     }
589 589
 
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
             $company->logo->image_width = 100 + $i;
734 734
             $company->logo->image_height = 100 + $i;
735 735
             $company->logo->company = $company;
736
-            for($j=0;$j<3;$j++) {
736
+            for ($j = 0; $j < 3; $j++) {
737 737
                 $department = new Department();
738 738
                 $department->name = "name$i$j";
739 739
                 $department->company = $company;
Please login to merge, or discard this patch.
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
         $this->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
-        $this->assertEquals(3, count($contracts), "There should be 3 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyContract'");
333
+        $this->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
-        $this->assertEquals(1, count($contracts), "There should be 1 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
337
+        $this->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
-        $this->assertEquals(2, count($contracts), "There should be 2 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
341
+        $this->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
-        $this->assertEquals(1, count($contracts), "There should be 1 entities related to " . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
345
+        $this->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/QueryTest.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
149 149
 
150 150
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
151
-                  ->getSingleResult();
151
+                    ->getSingleResult();
152 152
     }
153 153
 
154 154
     public function testInvalidInputParameterThrowsException()
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
         $this->expectException(QueryException::class);
157 157
 
158 158
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
159
-                  ->setParameter(1, 'jwage')
160
-                  ->getSingleResult();
159
+                    ->setParameter(1, 'jwage')
160
+                    ->getSingleResult();
161 161
     }
162 162
 
163 163
     public function testSetParameters()
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
         $parameters->add(new Parameter(2, 'active'));
168 168
 
169 169
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
170
-                  ->setParameters($parameters)
171
-                  ->getResult();
170
+                    ->setParameters($parameters)
171
+                    ->getResult();
172 172
 
173 173
         $extractValue = function (Parameter $parameter) {
174 174
             return $parameter->getValue();
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
         $parameters = [1 => 'jwage', 2 => 'active'];
186 186
 
187 187
         $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
188
-                  ->setParameters($parameters)
189
-                  ->getResult();
188
+                    ->setParameters($parameters)
189
+                    ->getResult();
190 190
 
191 191
         self::assertSame(
192 192
             array_values($parameters),
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     public function testGetSingleResultThrowsExceptionOnNoResult()
331 331
     {
332 332
         $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a")
333
-             ->getSingleResult();
333
+                ->getSingleResult();
334 334
     }
335 335
 
336 336
     /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     public function testGetSingleScalarResultThrowsExceptionOnNoResult()
340 340
     {
341 341
         $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a")
342
-             ->getSingleScalarResult();
342
+                ->getSingleScalarResult();
343 343
     }
344 344
 
345 345
     /**
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         $this->_em->clear();
371 371
 
372 372
         $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a")
373
-             ->getSingleScalarResult();
373
+                ->getSingleScalarResult();
374 374
     }
375 375
 
376 376
     public function testModifiedLimitQuery()
@@ -387,27 +387,27 @@  discard block
 block discarded – undo
387 387
         $this->_em->clear();
388 388
 
389 389
         $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
390
-                  ->setFirstResult(1)
391
-                  ->setMaxResults(2)
392
-                  ->getResult();
390
+                    ->setFirstResult(1)
391
+                    ->setMaxResults(2)
392
+                    ->getResult();
393 393
 
394 394
         $this->assertEquals(2, count($data));
395 395
         $this->assertEquals('gblanco1', $data[0]->username);
396 396
         $this->assertEquals('gblanco2', $data[1]->username);
397 397
 
398 398
         $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
399
-                  ->setFirstResult(3)
400
-                  ->setMaxResults(2)
401
-                  ->getResult();
399
+                    ->setFirstResult(3)
400
+                    ->setMaxResults(2)
401
+                    ->getResult();
402 402
 
403 403
         $this->assertEquals(2, count($data));
404 404
         $this->assertEquals('gblanco3', $data[0]->username);
405 405
         $this->assertEquals('gblanco4', $data[1]->username);
406 406
 
407 407
         $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
408
-                  ->setFirstResult(3)
409
-                  ->setMaxResults(2)
410
-                  ->getScalarResult();
408
+                    ->setFirstResult(3)
409
+                    ->setMaxResults(2)
410
+                    ->getScalarResult();
411 411
     }
412 412
 
413 413
     public function testSupportsQueriesWithEntityNamespaces()
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
         $this->_em->clear();
477 477
 
478 478
         $articles = $this->_em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a')
479
-                         ->setFetchMode(CmsArticle::class, 'user', ClassMetadata::FETCH_EAGER)
480
-                         ->getResult();
479
+                            ->setFetchMode(CmsArticle::class, 'user', ClassMetadata::FETCH_EAGER)
480
+                            ->getResult();
481 481
 
482 482
         $this->assertEquals(10, count($articles));
483 483
         foreach ($articles AS $article) {
@@ -619,9 +619,9 @@  discard block
 block discarded – undo
619 619
     {
620 620
         $qb = $this->_em->createQueryBuilder();
621 621
         $qb->select('u')
622
-           ->from(CmsUser::class, 'u')
623
-           ->innerJoin('u.articles', 'a')
624
-           ->where('(u.id = 0) OR (u.id IS NULL)');
622
+            ->from(CmsUser::class, 'u')
623
+            ->innerJoin('u.articles', 'a')
624
+            ->where('(u.id = 0) OR (u.id IS NULL)');
625 625
 
626 626
         $query = $qb->getQuery();
627 627
         $users = $query->execute();
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $this->_em->flush();
95 95
         $this->_em->clear();
96 96
 
97
-        $query = $this->_em->createQuery('select u, a from ' . CmsUser::class . ' u join u.articles a ORDER BY a.topic');
97
+        $query = $this->_em->createQuery('select u, a from '.CmsUser::class.' u join u.articles a ORDER BY a.topic');
98 98
         $users = $query->getResult();
99 99
         $this->assertEquals(1, count($users));
100 100
         $this->assertInstanceOf(CmsUser::class, $users[0]);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->_em->flush();
114 114
         $this->_em->clear();
115 115
 
116
-        $q = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.username = ?0');
116
+        $q = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.username = ?0');
117 117
         $q->setParameter(0, 'jwage');
118 118
         $user = $q->getSingleResult();
119 119
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $this->expectException(QueryException::class);
126 126
         $this->expectExceptionMessage('Invalid parameter: token 2 is not defined in the query.');
127 127
 
128
-        $q = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1');
128
+        $q = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1');
129 129
         $q->setParameter(2, 'jwage');
130 130
         $user = $q->getSingleResult();
131 131
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $this->expectException(QueryException::class);
136 136
         $this->expectExceptionMessage('Too many parameters: the query defines 1 parameters and you bound 2');
137 137
 
138
-        $q = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1');
138
+        $q = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1');
139 139
         $q->setParameter(1, 'jwage');
140 140
         $q->setParameter(2, 'jwage');
141 141
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $this->expectException(QueryException::class);
148 148
         $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0');
149 149
 
150
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1')
150
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1')
151 151
                   ->getSingleResult();
152 152
     }
153 153
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     {
156 156
         $this->expectException(QueryException::class);
157 157
 
158
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?')
158
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?')
159 159
                   ->setParameter(1, 'jwage')
160 160
                   ->getSingleResult();
161 161
     }
@@ -166,11 +166,11 @@  discard block
 block discarded – undo
166 166
         $parameters->add(new Parameter(1, 'jwage'));
167 167
         $parameters->add(new Parameter(2, 'active'));
168 168
 
169
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
169
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2')
170 170
                   ->setParameters($parameters)
171 171
                   ->getResult();
172 172
 
173
-        $extractValue = function (Parameter $parameter) {
173
+        $extractValue = function(Parameter $parameter) {
174 174
             return $parameter->getValue();
175 175
         };
176 176
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $parameters = [1 => 'jwage', 2 => 'active'];
186 186
 
187
-        $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2')
187
+        $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2')
188 188
                   ->setParameters($parameters)
189 189
                   ->getResult();
190 190
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $this->_em->clear();
215 215
         $articleId = $article1->id;
216 216
 
217
-        $query = $this->_em->createQuery('select a from ' . CmsArticle::class . ' a WHERE a.topic = ?1');
217
+        $query = $this->_em->createQuery('select a from '.CmsArticle::class.' a WHERE a.topic = ?1');
218 218
         $articles = $query->iterate(new ArrayCollection([new Parameter(1, 'Doctrine 2')]), Query::HYDRATE_ARRAY);
219 219
 
220 220
         $found = [];
@@ -255,19 +255,19 @@  discard block
 block discarded – undo
255 255
         $this->_em->flush();
256 256
         $this->_em->clear();
257 257
 
258
-        $query = $this->_em->createQuery('select a from ' . CmsArticle::class . ' a');
258
+        $query = $this->_em->createQuery('select a from '.CmsArticle::class.' a');
259 259
         $articles = $query->iterate();
260 260
 
261 261
         $iteratedCount = 0;
262 262
         $topics = [];
263 263
 
264
-        foreach($articles AS $row) {
264
+        foreach ($articles AS $row) {
265 265
             $article = $row[0];
266 266
             $topics[] = $article->topic;
267 267
 
268 268
             $identityMap = $this->_em->getUnitOfWork()->getIdentityMap();
269 269
             $identityMapCount = count($identityMap[CmsArticle::class]);
270
-            $this->assertTrue($identityMapCount>$iteratedCount);
270
+            $this->assertTrue($identityMapCount > $iteratedCount);
271 271
 
272 272
             $iteratedCount++;
273 273
         }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
         $iteratedCount = 0;
302 302
         $topics = [];
303
-        foreach($articles AS $row) {
303
+        foreach ($articles AS $row) {
304 304
             $article  = $row[0];
305 305
             $topics[] = $article->topic;
306 306
 
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
     {
378 378
         for ($i = 0; $i < 5; $i++) {
379 379
             $user = new CmsUser;
380
-            $user->name = 'Guilherme' . $i;
381
-            $user->username = 'gblanco' . $i;
380
+            $user->name = 'Guilherme'.$i;
381
+            $user->username = 'gblanco'.$i;
382 382
             $user->status = 'developer';
383 383
             $this->_em->persist($user);
384 384
         }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $this->_em->flush();
387 387
         $this->_em->clear();
388 388
 
389
-        $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
389
+        $data = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u')
390 390
                   ->setFirstResult(1)
391 391
                   ->setMaxResults(2)
392 392
                   ->getResult();
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         $this->assertEquals('gblanco1', $data[0]->username);
396 396
         $this->assertEquals('gblanco2', $data[1]->username);
397 397
 
398
-        $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
398
+        $data = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u')
399 399
                   ->setFirstResult(3)
400 400
                   ->setMaxResults(2)
401 401
                   ->getResult();
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         $this->assertEquals('gblanco3', $data[0]->username);
405 405
         $this->assertEquals('gblanco4', $data[1]->username);
406 406
 
407
-        $data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
407
+        $data = $this->_em->createQuery('SELECT u FROM '.CmsUser::class.' u')
408 408
                   ->setFirstResult(3)
409 409
                   ->setMaxResults(2)
410 410
                   ->getScalarResult();
@@ -498,13 +498,13 @@  discard block
 block discarded – undo
498 498
         $this->_em->flush();
499 499
         $this->_em->clear();
500 500
 
501
-        $query = $this->_em->createQuery("select u from " . CmsUser::class . " u where u.username = 'gblanco'");
501
+        $query = $this->_em->createQuery("select u from ".CmsUser::class." u where u.username = 'gblanco'");
502 502
 
503 503
         $fetchedUser = $query->getOneOrNullResult();
504 504
         $this->assertInstanceOf(CmsUser::class, $fetchedUser);
505 505
         $this->assertEquals('gblanco', $fetchedUser->username);
506 506
 
507
-        $query = $this->_em->createQuery("select u.username from " . CmsUser::class . " u where u.username = 'gblanco'");
507
+        $query = $this->_em->createQuery("select u.username from ".CmsUser::class." u where u.username = 'gblanco'");
508 508
         $fetchedUsername = $query->getOneOrNullResult(Query::HYDRATE_SINGLE_SCALAR);
509 509
         $this->assertEquals('gblanco', $fetchedUsername);
510 510
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DefaultValuesTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public $address;
112 112
 
113
-    public function getId() {return $this->id;}
113
+    public function getId() {return $this->id; }
114 114
 }
115 115
 
116 116
 /**
@@ -152,5 +152,5 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public $user;
154 154
 
155
-    public function getUser() {return $this->user;}
155
+    public function getUser() {return $this->user; }
156 156
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $driver = new DatabaseDriver($sm);
41 41
 
42 42
         foreach ($driver->getAllClassNames() as $className) {
43
-            if (!in_array(strtolower($className), $classNames)) {
43
+            if ( ! in_array(strtolower($className), $classNames)) {
44 44
                 continue;
45 45
             }
46 46
             $class = new ClassMetadataInfo($className);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         if (count($metadatas) != count($classNames)) {
52
-            $this->fail("Have not found all classes matching the names '" . implode(", ", $classNames) . "' only tables " . implode(", ", array_keys($metadatas)));
52
+            $this->fail("Have not found all classes matching the names '".implode(", ", $classNames)."' only tables ".implode(", ", array_keys($metadatas)));
53 53
         }
54 54
         return $metadatas;
55 55
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     private function registerType(string $className)
36 36
     {
37
-        $type = constant($className . '::NAME');
37
+        $type = constant($className.'::NAME');
38 38
 
39 39
         if (DBALType::hasType($type)) {
40 40
             DBALType::overrideType($type, $className);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         foreach ($classes as $class) {
71 71
             $ce = $validator->validateClass($class);
72 72
 
73
-            $this->assertEmpty($ce, "Invalid Modelset: " . $modelSet . " class " . $class->name . ": ". implode("\n", $ce));
73
+            $this->assertEmpty($ce, "Invalid Modelset: ".$modelSet." class ".$class->name.": ".implode("\n", $ce));
74 74
         }
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
         $eventManager->addEventListener([Events::postLoad], $listener);
233 233
 
234 234
         $this->_em->find(CmsUser::class, $this->userId);
235
-        $this->assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!');
236
-        $this->assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!');
235
+        $this->assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!');
236
+        $this->assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!');
237 237
     }
238 238
 
239 239
     private function loadFixture()
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
     {
310 310
         $object = $event->getObject();
311 311
         $class = ClassUtils::getClass($object);
312
-        if (!isset($this->firedByClasses[$class])) {
312
+        if ( ! isset($this->firedByClasses[$class])) {
313 313
             $this->firedByClasses[$class] = 1;
314 314
         } else {
315 315
             $this->firedByClasses[$class]++;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/HydrationCacheTest.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,37 +34,37 @@
 block discarded – undo
34 34
         $dql = "SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u";
35 35
 
36 36
         $users = $this->_em->createQuery($dql)
37
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
38
-                      ->getResult();
37
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
38
+                        ->getResult();
39 39
 
40 40
         $c = $this->getCurrentQueryCount();
41 41
         $users = $this->_em->createQuery($dql)
42
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
43
-                      ->getResult();
42
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
43
+                        ->getResult();
44 44
 
45 45
         $this->assertEquals($c, $this->getCurrentQueryCount(), "Should not execute query. Its cached!");
46 46
 
47 47
         $users = $this->_em->createQuery($dql)
48
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
49
-                      ->getArrayResult();
48
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
49
+                        ->getArrayResult();
50 50
 
51 51
         $this->assertEquals($c + 1, $this->getCurrentQueryCount(), "Hydration is part of cache key.");
52 52
 
53 53
         $users = $this->_em->createQuery($dql)
54
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
55
-                      ->getArrayResult();
54
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
55
+                        ->getArrayResult();
56 56
 
57 57
         $this->assertEquals($c + 1, $this->getCurrentQueryCount(), "Hydration now cached");
58 58
 
59 59
         $users = $this->_em->createQuery($dql)
60
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
61
-                      ->getArrayResult();
60
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
61
+                        ->getArrayResult();
62 62
 
63 63
         $this->assertTrue($cache->contains('cachekey'), 'Explicit cache key');
64 64
 
65 65
         $users = $this->_em->createQuery($dql)
66
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
67
-                      ->getArrayResult();
66
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
67
+                        ->getArrayResult();
68 68
         $this->assertEquals($c + 2, $this->getCurrentQueryCount(), "Hydration now cached");
69 69
     }
70 70
 
Please login to merge, or discard this patch.