Completed
Pull Request — master (#7046)
by Gabriel
13:08
created
tests/Doctrine/Tests/ORM/Functional/PaginationTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $iter = $paginator->getIterator();
132 132
         self::assertCount(9, $iter);
133 133
         $result = iterator_to_array($iter);
134
-        self::assertEquals($checkField . '0', $result[0]->{$checkField});
134
+        self::assertEquals($checkField.'0', $result[0]->{$checkField});
135 135
     }
136 136
 
137 137
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $iter = $paginator->getIterator();
148 148
         self::assertCount(3, $iter);
149 149
         $result = iterator_to_array($iter);
150
-        self::assertEquals($checkField . '0', $result[0]->{$checkField});
150
+        self::assertEquals($checkField.'0', $result[0]->{$checkField});
151 151
     }
152 152
 
153 153
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $iter = $paginator->getIterator();
164 164
         self::assertCount(3, $iter);
165 165
         $result = iterator_to_array($iter);
166
-        self::assertEquals($checkField . '3', $result[0]->{$checkField});
166
+        self::assertEquals($checkField.'3', $result[0]->{$checkField});
167 167
     }
168 168
 
169 169
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $iter = $paginator->getIterator();
177 177
         self::assertCount(9, $iter);
178 178
         $result = iterator_to_array($iter);
179
-        self::assertEquals($checkField . '8', $result[0]->{$checkField});
179
+        self::assertEquals($checkField.'8', $result[0]->{$checkField});
180 180
     }
181 181
 
182 182
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $iter = $paginator->getIterator();
192 192
         self::assertCount(3, $iter);
193 193
         $result = iterator_to_array($iter);
194
-        self::assertEquals($checkField . '8', $result[0]->{$checkField});
194
+        self::assertEquals($checkField.'8', $result[0]->{$checkField});
195 195
     }
196 196
 
197 197
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $iter = $paginator->getIterator();
207 207
         self::assertCount(3, $iter);
208 208
         $result = iterator_to_array($iter);
209
-        self::assertEquals($checkField . '5', $result[0]->{$checkField});
209
+        self::assertEquals($checkField.'5', $result[0]->{$checkField});
210 210
     }
211 211
 
212 212
     /**
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBoth($useOutputWalkers)
480 480
     {
481 481
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
482
-        $dqlAsc = $dql . ' ASC, d.name';
483
-        $dqlDesc = $dql . ' DESC, d.name';
482
+        $dqlAsc = $dql.' ASC, d.name';
483
+        $dqlDesc = $dql.' DESC, d.name';
484 484
         $this->iterateWithOrderAsc($useOutputWalkers, true, $dqlAsc, 'name');
485 485
         $this->iterateWithOrderDesc($useOutputWalkers, true, $dqlDesc, 'name');
486 486
     }
@@ -488,8 +488,8 @@  discard block
 block discarded – undo
488 488
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBothWithLimitWithOutputWalker()
489 489
     {
490 490
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
491
-        $dqlAsc = $dql . ' ASC, d.name';
492
-        $dqlDesc = $dql . ' DESC, d.name';
491
+        $dqlAsc = $dql.' ASC, d.name';
492
+        $dqlDesc = $dql.' DESC, d.name';
493 493
         $this->iterateWithOrderAscWithLimit(true, true, $dqlAsc, 'name');
494 494
         $this->iterateWithOrderDescWithLimit(true, true, $dqlDesc, 'name');
495 495
     }
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
         $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.');
501 501
 
502 502
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
503
-        $dqlAsc = $dql . ' ASC, d.name';
504
-        $dqlDesc = $dql . ' DESC, d.name';
503
+        $dqlAsc = $dql.' ASC, d.name';
504
+        $dqlDesc = $dql.' DESC, d.name';
505 505
         $this->iterateWithOrderAscWithLimit(false, true, $dqlAsc, 'name');
506 506
         $this->iterateWithOrderDescWithLimit(false, true, $dqlDesc, 'name');
507 507
     }
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         $users = iterator_to_array($paginator->getIterator());
586 586
         self::assertCount(9, $users);
587 587
         foreach ($users as $i => $user) {
588
-            self::assertEquals('username' . (8 - $i), $user->username);
588
+            self::assertEquals('username'.(8 - $i), $user->username);
589 589
         }
590 590
     }
591 591
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             $company->logo->image_width = 100 + $i;
736 736
             $company->logo->image_height = 100 + $i;
737 737
             $company->logo->company = $company;
738
-            for ($j=0;$j<3;$j++) {
738
+            for ($j = 0; $j < 3; $j++) {
739 739
                 $department = new Department();
740 740
                 $department->name = "name$i$j";
741 741
                 $department->company = $company;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
 
333 333
         $repos = $this->em->getRepository(CompanyContract::class);
334 334
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
335
-        self::assertCount(3, $contracts, 'There should be 3 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyContract'");
335
+        self::assertCount(3, $contracts, 'There should be 3 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyContract'");
336 336
 
337 337
         $repos = $this->em->getRepository(CompanyFixContract::class);
338 338
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
339
-        self::assertCount(1, $contracts, 'There should be 1 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
339
+        self::assertCount(1, $contracts, 'There should be 1 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFixContract'");
340 340
 
341 341
         $repos = $this->em->getRepository(CompanyFlexContract::class);
342 342
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
343
-        self::assertCount(2, $contracts, 'There should be 2 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
343
+        self::assertCount(2, $contracts, 'There should be 2 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexContract'");
344 344
 
345 345
         $repos = $this->em->getRepository(CompanyFlexUltraContract::class);
346 346
         $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]);
347
-        self::assertCount(1, $contracts, 'There should be 1 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
347
+        self::assertCount(1, $contracts, 'There should be 1 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'");
348 348
     }
349 349
 
350 350
     /**
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $this->em->clear();
49 49
 
50 50
         $routes = $this->em->createQuery(
51
-            "SELECT r, l, f, t FROM Doctrine\Tests\Models\Routing\RoutingRoute r " .
51
+            "SELECT r, l, f, t FROM Doctrine\Tests\Models\Routing\RoutingRoute r ".
52 52
             'JOIN r.legs l JOIN l.fromLocation f JOIN l.toLocation t'
53 53
         )->getSingleResult();
54 54
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/SequenceEmulatedIdentityStrategyTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     {
18 18
         parent::setUp();
19 19
 
20
-        if (! $this->em->getConnection()->getDatabasePlatform()->usesSequenceEmulatedIdentityColumns()) {
20
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->usesSequenceEmulatedIdentityColumns()) {
21 21
             $this->markTestSkipped(
22 22
                 'This test is special to platforms emulating IDENTITY key generation strategy through sequences.'
23 23
             );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function addType(Type $type)
214 214
     {
215
-        if (! $this->types->contains($type)) {
215
+        if ( ! $this->types->contains($type)) {
216 216
             $this->types[] = $type;
217 217
             $type->addLemma($this);
218 218
         }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     public function addLemma(Lemma $lemma)
331 331
     {
332
-        if (! $this->lemmas->contains($lemma)) {
332
+        if ( ! $this->lemmas->contains($lemma)) {
333 333
             $this->lemmas[] = $lemma;
334 334
             $lemma->addType($this);
335 335
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $this->em->clear();
50 50
 
51
-        $query = $this->em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc');
51
+        $query = $this->em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc');
52 52
 
53 53
         $entities = $query->getResult();
54 54
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $this->em->clear();
65 65
 
66
-        $query = $this->em->createQuery('select p from ' . CompanyEmployee::class . ' p');
66
+        $query = $this->em->createQuery('select p from '.CompanyEmployee::class.' p');
67 67
 
68 68
         $entities = $query->getResult();
69 69
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->em->clear();
84 84
 
85
-        $query = $this->em->createQuery('update ' . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
85
+        $query = $this->em->createQuery('update '.CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
86 86
 
87 87
         $query->setParameter(1, 'NewName', 'string');
88 88
         $query->setParameter(2, 'NewDepartment');
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         self::assertEquals(1, $numUpdated);
95 95
 
96
-        $query = $this->em->createQuery('delete from ' . CompanyPerson::class . ' p');
96
+        $query = $this->em->createQuery('delete from '.CompanyPerson::class.' p');
97 97
 
98 98
         $numDeleted = $query->execute();
99 99
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $this->em->flush();
169 169
         $this->em->clear();
170 170
 
171
-        $query = $this->em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\'');
171
+        $query = $this->em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\'');
172 172
 
173 173
         $result = $query->getResult();
174 174
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         $this->em->clear();
202 202
 
203
-        $query = $this->em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1');
203
+        $query = $this->em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1');
204 204
 
205 205
         $query->setParameter(1, 'Roman');
206 206
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $this->em->flush();
267 267
         $this->em->clear();
268 268
 
269
-        $q = $this->em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1');
269
+        $q = $this->em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1');
270 270
 
271 271
         $q->setParameter(1, $event1->getId());
272 272
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 
278 278
         $this->em->clear();
279 279
 
280
-        $q = $this->em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1');
280
+        $q = $this->em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1');
281 281
 
282 282
         $q->setParameter(1, $org->getId());
283 283
 
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function testBulkUpdateIssueDDC368()
300 300
     {
301
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
301
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1')
302 302
                   ->execute();
303 303
 
304
-        $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1')
304
+        $result = $this->em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1')
305 305
                             ->getResult();
306 306
 
307 307
         self::assertGreaterThan(0, $result);
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public function testBulkUpdateNonScalarParameterDDC1341()
314 314
     {
315
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
315
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1')
316 316
                   ->setParameter(0, new \DateTime())
317 317
                   ->setParameter(1, 'IT')
318 318
                   ->execute();
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         $this->em->flush();
371 371
         $this->em->clear();
372 372
 
373
-        $dqlManager = $this->em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1')
373
+        $dqlManager = $this->em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1')
374 374
                                 ->setParameter(1, $person->getId())
375 375
                                 ->getSingleResult();
376 376
 
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
@@ -36,37 +36,37 @@
 block discarded – undo
36 36
         $dql = "SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u";
37 37
 
38 38
         $users = $this->em->createQuery($dql)
39
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
40
-                      ->getResult();
39
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
40
+                        ->getResult();
41 41
 
42 42
         $c = $this->getCurrentQueryCount();
43 43
         $users = $this->em->createQuery($dql)
44
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
45
-                      ->getResult();
44
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
45
+                        ->getResult();
46 46
 
47 47
         self::assertEquals($c, $this->getCurrentQueryCount(), 'Should not execute query. Its cached!');
48 48
 
49 49
         $users = $this->em->createQuery($dql)
50
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
51
-                      ->getArrayResult();
50
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
51
+                        ->getArrayResult();
52 52
 
53 53
         self::assertEquals($c + 1, $this->getCurrentQueryCount(), 'Hydration is part of cache key.');
54 54
 
55 55
         $users = $this->em->createQuery($dql)
56
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
57
-                      ->getArrayResult();
56
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache))
57
+                        ->getArrayResult();
58 58
 
59 59
         self::assertEquals($c + 1, $this->getCurrentQueryCount(), 'Hydration now cached');
60 60
 
61 61
         $users = $this->em->createQuery($dql)
62
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
63
-                      ->getArrayResult();
62
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
63
+                        ->getArrayResult();
64 64
 
65 65
         self::assertTrue($cache->contains('cachekey'), 'Explicit cache key');
66 66
 
67 67
         $users = $this->em->createQuery($dql)
68
-                      ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
69
-                      ->getArrayResult();
68
+                        ->setHydrationCacheProfile(new QueryCacheProfile(null, 'cachekey', $cache))
69
+                        ->getArrayResult();
70 70
         self::assertEquals($c + 2, $this->getCurrentQueryCount(), 'Hydration now cached');
71 71
     }
72 72
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id);
48 48
 
49 49
         self::assertEquals('foo', $entity->lowerCaseString, 'Entity holds lowercase string');
50
-        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select lowerCaseString from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string');
50
+        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select lowerCaseString from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string');
51 51
     }
52 52
 
53 53
     /**
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 
69 69
         $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id);
70 70
         self::assertEquals('foo', $entity->namedLowerCaseString, 'Entity holds lowercase string');
71
-        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string');
71
+        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string');
72 72
 
73
-        $entity->namedLowerCaseString   = 'bar';
73
+        $entity->namedLowerCaseString = 'bar';
74 74
 
75 75
         $this->em->persist($entity);
76 76
         $this->em->flush();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id);
83 83
         self::assertEquals('bar', $entity->namedLowerCaseString, 'Entity holds lowercase string');
84
-        self::assertEquals('BAR', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string');
84
+        self::assertEquals('BAR', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string');
85 85
     }
86 86
 
87 87
     public function testTypeValueSqlWithAssociations()
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $entity = $this->em->find(CustomTypeParent::class, $parentId);
109 109
 
110 110
         self::assertTrue($entity->customInteger < 0, 'Fetched customInteger negative');
111
-        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select customInteger from customtype_parents where id=' . $entity->id . ''), 'Database has stored customInteger positive');
111
+        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select customInteger from customtype_parents where id='.$entity->id.''), 'Database has stored customInteger positive');
112 112
 
113 113
         self::assertNotNull($parent->child, 'Child attached');
114 114
         self::assertCount(2, $entity->getMyFriends(), '2 friends attached');
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $this->em->clear();
129 129
 
130
-        $query = $this->em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = " . $parentId);
130
+        $query = $this->em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = ".$parentId);
131 131
 
132 132
         $result = $query->getResult();
133 133
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                 ]
27 27
             );
28 28
         } catch (\Exception $e) {
29
-            $this->fail($e->getMessage() . PHP_EOL . $e->getTraceAsString());
29
+            $this->fail($e->getMessage().PHP_EOL.$e->getTraceAsString());
30 30
         }
31 31
     }
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $conn = static::$sharedConn;
36 36
 
37 37
         // In case test is skipped, tearDown is called, but no setup may have run
38
-        if (! $conn) {
38
+        if ( ! $conn) {
39 39
             return;
40 40
         }
41 41
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $baz = $this->em->find(get_class($baz), $baz->id);
79 79
         foreach ($baz->foos as $foo) {
80
-            self::assertEquals(1, $foo->loaded, 'should have loaded callback counter incremented for ' . get_class($foo));
80
+            self::assertEquals(1, $foo->loaded, 'should have loaded callback counter incremented for '.get_class($foo));
81 81
         }
82 82
     }
83 83
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         self::assertEquals(1, $bar->loaded);
102 102
         self::assertEquals(1, $bar->subLoaded);
103 103
 
104
-        $dql = 'SELECT b FROM ' . __NAMESPACE__ . "\DDC1655Bar b WHERE b.id = ?1";
104
+        $dql = 'SELECT b FROM '.__NAMESPACE__."\DDC1655Bar b WHERE b.id = ?1";
105 105
         $bar = $this->em->createQuery($dql)->setParameter(1, $bar->id)->getSingleResult();
106 106
 
107 107
         self::assertEquals(1, $bar->loaded);
Please login to merge, or discard this patch.