@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | private $ownerO; |
156 | 156 | |
157 | - public function __construct(CascadeRemoveOrderEntityO $eO, $position=1) |
|
157 | + public function __construct(CascadeRemoveOrderEntityO $eO, $position = 1) |
|
158 | 158 | { |
159 | 159 | $this->position = $position; |
160 | 160 | $this->ownerO = $eO; |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->em->flush(); |
31 | 31 | $this->em->clear(); |
32 | 32 | |
33 | - $dql = 'SELECT d FROM ' . DecimalModel::class . ' d'; |
|
33 | + $dql = 'SELECT d FROM '.DecimalModel::class.' d'; |
|
34 | 34 | $decimal = $this->em->createQuery($dql)->getSingleResult(); |
35 | 35 | |
36 | 36 | self::assertSame('0.15', $decimal->decimal); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->em->flush(); |
50 | 50 | $this->em->clear(); |
51 | 51 | |
52 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = true'; |
|
52 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = true'; |
|
53 | 53 | $bool = $this->em->createQuery($dql)->getSingleResult(); |
54 | 54 | |
55 | 55 | self::assertTrue($bool->booleanField); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->em->flush(); |
60 | 60 | $this->em->clear(); |
61 | 61 | |
62 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = false'; |
|
62 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = false'; |
|
63 | 63 | $bool = $this->em->createQuery($dql)->getSingleResult(); |
64 | 64 | |
65 | 65 | self::assertFalse($bool->booleanField); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $this->em->flush(); |
76 | 76 | $this->em->clear(); |
77 | 77 | |
78 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
78 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
79 | 79 | $serialize = $this->em->createQuery($dql)->getSingleResult(); |
80 | 80 | |
81 | 81 | self::assertSame(['foo' => 'bar', 'bar' => 'baz'], $serialize->array); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->em->flush(); |
91 | 91 | $this->em->clear(); |
92 | 92 | |
93 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
93 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
94 | 94 | $serialize = $this->em->createQuery($dql)->getSingleResult(); |
95 | 95 | |
96 | 96 | self::assertInstanceOf('stdClass', $serialize->object); |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | $queryCount = $this->getCurrentQueryCount(); |
308 | 308 | self::assertFalse($user->articles->contains($article)); |
309 | - self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), 'Checking for contains of persisted entity should cause one query to be executed.'); |
|
309 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), 'Checking for contains of persisted entity should cause one query to be executed.'); |
|
310 | 310 | self::assertFalse($user->articles->isInitialized(), 'Post-Condition: Collection is not initialized.'); |
311 | 311 | |
312 | 312 | // Test One to Many existence with state managed |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | |
474 | 474 | $queryCount = $this->getCurrentQueryCount(); |
475 | 475 | self::assertTrue($group->users->contains($user)); |
476 | - self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), 'Checking for contains of managed entity should cause one query to be executed.'); |
|
476 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), 'Checking for contains of managed entity should cause one query to be executed.'); |
|
477 | 477 | self::assertFalse($user->groups->isInitialized(), 'Post-Condition: Collection is not initialized.'); |
478 | 478 | |
479 | 479 | $newUser = new CmsUser(); |
@@ -36,37 +36,37 @@ |
||
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 |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0'); |
150 | 150 | |
151 | 151 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1') |
152 | - ->getSingleResult(); |
|
152 | + ->getSingleResult(); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | public function testInvalidInputParameterThrowsException() |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | $this->expectException(QueryException::class); |
158 | 158 | |
159 | 159 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?') |
160 | - ->setParameter(1, 'jwage') |
|
161 | - ->getSingleResult(); |
|
160 | + ->setParameter(1, 'jwage') |
|
161 | + ->getSingleResult(); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | public function testSetParameters() |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | $parameters->add(new Parameter(2, 'active')); |
169 | 169 | |
170 | 170 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
171 | - ->setParameters($parameters) |
|
172 | - ->getResult(); |
|
171 | + ->setParameters($parameters) |
|
172 | + ->getResult(); |
|
173 | 173 | |
174 | 174 | $extractValue = function (Parameter $parameter) { |
175 | 175 | return $parameter->getValue(); |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | $parameters = [1 => 'jwage', 2 => 'active']; |
187 | 187 | |
188 | 188 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
189 | - ->setParameters($parameters) |
|
190 | - ->getResult(); |
|
189 | + ->setParameters($parameters) |
|
190 | + ->getResult(); |
|
191 | 191 | |
192 | 192 | self::assertSame( |
193 | 193 | array_values($parameters), |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | public function testGetSingleResultThrowsExceptionOnNoResult() |
332 | 332 | { |
333 | 333 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
334 | - ->getSingleResult(); |
|
334 | + ->getSingleResult(); |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | /** |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | public function testGetSingleScalarResultThrowsExceptionOnNoResult() |
341 | 341 | { |
342 | 342 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
343 | - ->getSingleScalarResult(); |
|
343 | + ->getSingleScalarResult(); |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | /** |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $this->em->clear(); |
372 | 372 | |
373 | 373 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
374 | - ->getSingleScalarResult(); |
|
374 | + ->getSingleScalarResult(); |
|
375 | 375 | } |
376 | 376 | |
377 | 377 | public function testModifiedLimitQuery() |
@@ -388,27 +388,27 @@ discard block |
||
388 | 388 | $this->em->clear(); |
389 | 389 | |
390 | 390 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
391 | - ->setFirstResult(1) |
|
392 | - ->setMaxResults(2) |
|
393 | - ->getResult(); |
|
391 | + ->setFirstResult(1) |
|
392 | + ->setMaxResults(2) |
|
393 | + ->getResult(); |
|
394 | 394 | |
395 | 395 | self::assertCount(2, $data); |
396 | 396 | self::assertEquals('gblanco1', $data[0]->username); |
397 | 397 | self::assertEquals('gblanco2', $data[1]->username); |
398 | 398 | |
399 | 399 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
400 | - ->setFirstResult(3) |
|
401 | - ->setMaxResults(2) |
|
402 | - ->getResult(); |
|
400 | + ->setFirstResult(3) |
|
401 | + ->setMaxResults(2) |
|
402 | + ->getResult(); |
|
403 | 403 | |
404 | 404 | self::assertCount(2, $data); |
405 | 405 | self::assertEquals('gblanco3', $data[0]->username); |
406 | 406 | self::assertEquals('gblanco4', $data[1]->username); |
407 | 407 | |
408 | 408 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
409 | - ->setFirstResult(3) |
|
410 | - ->setMaxResults(2) |
|
411 | - ->getScalarResult(); |
|
409 | + ->setFirstResult(3) |
|
410 | + ->setMaxResults(2) |
|
411 | + ->getScalarResult(); |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | /** |
@@ -619,9 +619,9 @@ discard block |
||
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(); |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -94,7 +94,7 @@ discard block |
||
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 | |
100 | 100 | self::assertCount(1, $users); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->em->flush(); |
115 | 115 | $this->em->clear(); |
116 | 116 | |
117 | - $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.username = ?0'); |
|
117 | + $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.username = ?0'); |
|
118 | 118 | $q->setParameter(0, 'jwage'); |
119 | 119 | $user = $q->getSingleResult(); |
120 | 120 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $this->expectException(QueryException::class); |
127 | 127 | $this->expectExceptionMessage('Invalid parameter: token 2 is not defined in the query.'); |
128 | 128 | |
129 | - $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1'); |
|
129 | + $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1'); |
|
130 | 130 | $q->setParameter(2, 'jwage'); |
131 | 131 | $user = $q->getSingleResult(); |
132 | 132 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $this->expectException(QueryException::class); |
137 | 137 | $this->expectExceptionMessage('Too many parameters: the query defines 1 parameters and you bound 2'); |
138 | 138 | |
139 | - $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1'); |
|
139 | + $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1'); |
|
140 | 140 | $q->setParameter(1, 'jwage'); |
141 | 141 | $q->setParameter(2, 'jwage'); |
142 | 142 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $this->expectException(QueryException::class); |
149 | 149 | $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0'); |
150 | 150 | |
151 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1') |
|
151 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1') |
|
152 | 152 | ->getSingleResult(); |
153 | 153 | } |
154 | 154 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | $this->expectException(QueryException::class); |
158 | 158 | |
159 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?') |
|
159 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?') |
|
160 | 160 | ->setParameter(1, 'jwage') |
161 | 161 | ->getSingleResult(); |
162 | 162 | } |
@@ -167,11 +167,11 @@ discard block |
||
167 | 167 | $parameters->add(new Parameter(1, 'jwage')); |
168 | 168 | $parameters->add(new Parameter(2, 'active')); |
169 | 169 | |
170 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
|
170 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2') |
|
171 | 171 | ->setParameters($parameters) |
172 | 172 | ->getResult(); |
173 | 173 | |
174 | - $extractValue = function (Parameter $parameter) { |
|
174 | + $extractValue = function(Parameter $parameter) { |
|
175 | 175 | return $parameter->getValue(); |
176 | 176 | }; |
177 | 177 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | { |
186 | 186 | $parameters = [1 => 'jwage', 2 => 'active']; |
187 | 187 | |
188 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
|
188 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2') |
|
189 | 189 | ->setParameters($parameters) |
190 | 190 | ->getResult(); |
191 | 191 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $this->em->clear(); |
216 | 216 | $articleId = $article1->id; |
217 | 217 | |
218 | - $query = $this->em->createQuery('select a from ' . CmsArticle::class . ' a WHERE a.topic = ?1'); |
|
218 | + $query = $this->em->createQuery('select a from '.CmsArticle::class.' a WHERE a.topic = ?1'); |
|
219 | 219 | $articles = $query->iterate(new ArrayCollection([new Parameter(1, 'Doctrine 2')]), Query::HYDRATE_ARRAY); |
220 | 220 | |
221 | 221 | $found = []; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $this->em->flush(); |
257 | 257 | $this->em->clear(); |
258 | 258 | |
259 | - $query = $this->em->createQuery('select a from ' . CmsArticle::class . ' a'); |
|
259 | + $query = $this->em->createQuery('select a from '.CmsArticle::class.' a'); |
|
260 | 260 | $articles = $query->iterate(); |
261 | 261 | |
262 | 262 | $iteratedCount = 0; |
@@ -378,8 +378,8 @@ discard block |
||
378 | 378 | { |
379 | 379 | for ($i = 0; $i < 5; $i++) { |
380 | 380 | $user = new CmsUser; |
381 | - $user->name = 'Guilherme' . $i; |
|
382 | - $user->username = 'gblanco' . $i; |
|
381 | + $user->name = 'Guilherme'.$i; |
|
382 | + $user->username = 'gblanco'.$i; |
|
383 | 383 | $user->status = 'developer'; |
384 | 384 | $this->em->persist($user); |
385 | 385 | } |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | $this->em->flush(); |
388 | 388 | $this->em->clear(); |
389 | 389 | |
390 | - $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
|
390 | + $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u') |
|
391 | 391 | ->setFirstResult(1) |
392 | 392 | ->setMaxResults(2) |
393 | 393 | ->getResult(); |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | self::assertEquals('gblanco1', $data[0]->username); |
397 | 397 | self::assertEquals('gblanco2', $data[1]->username); |
398 | 398 | |
399 | - $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
|
399 | + $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u') |
|
400 | 400 | ->setFirstResult(3) |
401 | 401 | ->setMaxResults(2) |
402 | 402 | ->getResult(); |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | self::assertEquals('gblanco3', $data[0]->username); |
406 | 406 | self::assertEquals('gblanco4', $data[1]->username); |
407 | 407 | |
408 | - $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
|
408 | + $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u') |
|
409 | 409 | ->setFirstResult(3) |
410 | 410 | ->setMaxResults(2) |
411 | 411 | ->getScalarResult(); |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | $author = new CmsUser; |
462 | 462 | |
463 | 463 | $author->name = 'anonymous'; |
464 | - $author->username = 'anon' . $i; |
|
464 | + $author->username = 'anon'.$i; |
|
465 | 465 | $author->status = 'here'; |
466 | 466 | $article->user = $author; |
467 | 467 | |
@@ -497,13 +497,13 @@ discard block |
||
497 | 497 | $this->em->flush(); |
498 | 498 | $this->em->clear(); |
499 | 499 | |
500 | - $query = $this->em->createQuery('select u from ' . CmsUser::class . " u where u.username = 'gblanco'"); |
|
500 | + $query = $this->em->createQuery('select u from '.CmsUser::class." u where u.username = 'gblanco'"); |
|
501 | 501 | $fetchedUser = $query->getOneOrNullResult(); |
502 | 502 | |
503 | 503 | self::assertInstanceOf(CmsUser::class, $fetchedUser); |
504 | 504 | self::assertEquals('gblanco', $fetchedUser->username); |
505 | 505 | |
506 | - $query = $this->em->createQuery('select u.username from ' . CmsUser::class . " u where u.username = 'gblanco'"); |
|
506 | + $query = $this->em->createQuery('select u.username from '.CmsUser::class." u where u.username = 'gblanco'"); |
|
507 | 507 | $fetchedUsername = $query->getOneOrNullResult(Query::HYDRATE_SINGLE_SCALAR); |
508 | 508 | |
509 | 509 | self::assertEquals('gblanco', $fetchedUsername); |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $this->em->flush(); |
41 | 41 | |
42 | 42 | $query = $this->em->createQuery('SELECT f, fl FROM Doctrine\Tests\ORM\Functional\Ticket\DDC1300Foo f JOIN f.fooLocaleRefFoo fl'); |
43 | - $result = $query->getResult(); |
|
43 | + $result = $query->getResult(); |
|
44 | 44 | |
45 | 45 | self::assertCount(1, $result); |
46 | 46 | } |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->em->flush(); |
66 | 66 | $this->em->clear(); |
67 | 67 | |
68 | - $appointments = $this->em->createQuery('SELECT a FROM ' . __NAMESPACE__ . '\DDC633Appointment a')->getResult(); |
|
68 | + $appointments = $this->em->createQuery('SELECT a FROM '.__NAMESPACE__.'\DDC633Appointment a')->getResult(); |
|
69 | 69 | |
70 | 70 | foreach ($appointments as $eagerAppointment) { |
71 | 71 | self::assertInstanceOf(GhostObjectInterface::class, $eagerAppointment->patient); |
@@ -37,19 +37,19 @@ discard block |
||
37 | 37 | |
38 | 38 | $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author'; |
39 | 39 | $this->em->createQuery($dql) |
40 | - ->setParameter('author', $user) |
|
41 | - ->getResult(); |
|
40 | + ->setParameter('author', $user) |
|
41 | + ->getResult(); |
|
42 | 42 | |
43 | 43 | $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author AND a.user = :author'; |
44 | 44 | $this->em->createQuery($dql) |
45 | - ->setParameter('author', $user) |
|
46 | - ->getResult(); |
|
45 | + ->setParameter('author', $user) |
|
46 | + ->getResult(); |
|
47 | 47 | |
48 | 48 | $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author'; |
49 | 49 | $farticle = $this->em->createQuery($dql) |
50 | - ->setParameter('author', $user) |
|
51 | - ->setParameter('topic', 'This is John Galt speaking!') |
|
52 | - ->getSingleResult(); |
|
50 | + ->setParameter('author', $user) |
|
51 | + ->setParameter('topic', 'This is John Galt speaking!') |
|
52 | + ->getSingleResult(); |
|
53 | 53 | |
54 | 54 | self::assertSame($article, $farticle); |
55 | 55 | } |
@@ -72,10 +72,10 @@ discard block |
||
72 | 72 | |
73 | 73 | $dql = 'SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3'; |
74 | 74 | $farticle = $this->em->createQuery($dql) |
75 | - ->setParameter(1, 'This is John Galt speaking!') |
|
76 | - ->setParameter(2, $user) |
|
77 | - ->setParameter(3, $user) |
|
78 | - ->getSingleResult(); |
|
75 | + ->setParameter(1, 'This is John Galt speaking!') |
|
76 | + ->setParameter(2, $user) |
|
77 | + ->setParameter(3, $user) |
|
78 | + ->getSingleResult(); |
|
79 | 79 | |
80 | 80 | self::assertSame($article, $farticle); |
81 | 81 | } |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $this->em->flush(); |
35 | 35 | $this->em->clear(); |
36 | 36 | |
37 | - $q = $this->em->createQuery('select u,i from ' . __NAMESPACE__ . '\\DDC512Customer u left join u.item i'); |
|
37 | + $q = $this->em->createQuery('select u,i from '.__NAMESPACE__.'\\DDC512Customer u left join u.item i'); |
|
38 | 38 | $result = $q->getResult(); |
39 | 39 | |
40 | 40 | self::assertCount(2, $result); |