@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | public function assertCollectionEquals(Collection $first, Collection $second) |
50 | 50 | { |
51 | - return $first->forAll(static function ($k, $e) use ($second) { |
|
51 | + return $first->forAll(static function($k, $e) use ($second) { |
|
52 | 52 | return $second->contains($e); |
53 | 53 | }); |
54 | 54 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0'); |
151 | 151 | |
152 | 152 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1') |
153 | - ->getSingleResult(); |
|
153 | + ->getSingleResult(); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | public function testInvalidInputParameterThrowsException() : void |
@@ -158,8 +158,8 @@ discard block |
||
158 | 158 | $this->expectException(QueryException::class); |
159 | 159 | |
160 | 160 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?') |
161 | - ->setParameter(1, 'jwage') |
|
162 | - ->getSingleResult(); |
|
161 | + ->setParameter(1, 'jwage') |
|
162 | + ->getSingleResult(); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | public function testSetParameters() : void |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | $parameters->add(new Parameter(2, 'active')); |
170 | 170 | |
171 | 171 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
172 | - ->setParameters($parameters) |
|
173 | - ->getResult(); |
|
172 | + ->setParameters($parameters) |
|
173 | + ->getResult(); |
|
174 | 174 | |
175 | 175 | $extractValue = static function (Parameter $parameter) { |
176 | 176 | return $parameter->getValue(); |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | $parameters = [1 => 'jwage', 2 => 'active']; |
188 | 188 | |
189 | 189 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
190 | - ->setParameters($parameters) |
|
191 | - ->getResult(); |
|
190 | + ->setParameters($parameters) |
|
191 | + ->getResult(); |
|
192 | 192 | |
193 | 193 | self::assertSame( |
194 | 194 | array_values($parameters), |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | public function testGetSingleResultThrowsExceptionOnNoResult() : void |
333 | 333 | { |
334 | 334 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
335 | - ->getSingleResult(); |
|
335 | + ->getSingleResult(); |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | /** |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | public function testGetSingleScalarResultThrowsExceptionOnNoResult() : void |
342 | 342 | { |
343 | 343 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
344 | - ->getSingleScalarResult(); |
|
344 | + ->getSingleScalarResult(); |
|
345 | 345 | } |
346 | 346 | |
347 | 347 | /** |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | $this->em->clear(); |
373 | 373 | |
374 | 374 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
375 | - ->getSingleScalarResult(); |
|
375 | + ->getSingleScalarResult(); |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | public function testModifiedLimitQuery() : void |
@@ -389,27 +389,27 @@ discard block |
||
389 | 389 | $this->em->clear(); |
390 | 390 | |
391 | 391 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
392 | - ->setFirstResult(1) |
|
393 | - ->setMaxResults(2) |
|
394 | - ->getResult(); |
|
392 | + ->setFirstResult(1) |
|
393 | + ->setMaxResults(2) |
|
394 | + ->getResult(); |
|
395 | 395 | |
396 | 396 | self::assertCount(2, $data); |
397 | 397 | self::assertEquals('gblanco1', $data[0]->username); |
398 | 398 | self::assertEquals('gblanco2', $data[1]->username); |
399 | 399 | |
400 | 400 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
401 | - ->setFirstResult(3) |
|
402 | - ->setMaxResults(2) |
|
403 | - ->getResult(); |
|
401 | + ->setFirstResult(3) |
|
402 | + ->setMaxResults(2) |
|
403 | + ->getResult(); |
|
404 | 404 | |
405 | 405 | self::assertCount(2, $data); |
406 | 406 | self::assertEquals('gblanco3', $data[0]->username); |
407 | 407 | self::assertEquals('gblanco4', $data[1]->username); |
408 | 408 | |
409 | 409 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
410 | - ->setFirstResult(3) |
|
411 | - ->setMaxResults(2) |
|
412 | - ->getScalarResult(); |
|
410 | + ->setFirstResult(3) |
|
411 | + ->setMaxResults(2) |
|
412 | + ->getScalarResult(); |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | /** |
@@ -620,9 +620,9 @@ discard block |
||
620 | 620 | { |
621 | 621 | $qb = $this->em->createQueryBuilder(); |
622 | 622 | $qb->select('u') |
623 | - ->from(CmsUser::class, 'u') |
|
624 | - ->innerJoin('u.articles', 'a') |
|
625 | - ->where('(u.id = 0) OR (u.id IS NULL)'); |
|
623 | + ->from(CmsUser::class, 'u') |
|
624 | + ->innerJoin('u.articles', 'a') |
|
625 | + ->where('(u.id = 0) OR (u.id IS NULL)'); |
|
626 | 626 | |
627 | 627 | $query = $qb->getQuery(); |
628 | 628 | $users = $query->execute(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $this->em->flush(); |
96 | 96 | $this->em->clear(); |
97 | 97 | |
98 | - $query = $this->em->createQuery('select u, a from ' . CmsUser::class . ' u join u.articles a ORDER BY a.topic'); |
|
98 | + $query = $this->em->createQuery('select u, a from '.CmsUser::class.' u join u.articles a ORDER BY a.topic'); |
|
99 | 99 | $users = $query->getResult(); |
100 | 100 | |
101 | 101 | self::assertCount(1, $users); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $this->em->flush(); |
116 | 116 | $this->em->clear(); |
117 | 117 | |
118 | - $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.username = ?0'); |
|
118 | + $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.username = ?0'); |
|
119 | 119 | $q->setParameter(0, 'jwage'); |
120 | 120 | $user = $q->getSingleResult(); |
121 | 121 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $this->expectException(QueryException::class); |
128 | 128 | $this->expectExceptionMessage('Invalid parameter: token 2 is not defined in the query.'); |
129 | 129 | |
130 | - $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1'); |
|
130 | + $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1'); |
|
131 | 131 | $q->setParameter(2, 'jwage'); |
132 | 132 | $user = $q->getSingleResult(); |
133 | 133 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $this->expectException(QueryException::class); |
138 | 138 | $this->expectExceptionMessage('Too many parameters: the query defines 1 parameters and you bound 2'); |
139 | 139 | |
140 | - $q = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1'); |
|
140 | + $q = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1'); |
|
141 | 141 | $q->setParameter(1, 'jwage'); |
142 | 142 | $q->setParameter(2, 'jwage'); |
143 | 143 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->expectException(QueryException::class); |
150 | 150 | $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0'); |
151 | 151 | |
152 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1') |
|
152 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1') |
|
153 | 153 | ->getSingleResult(); |
154 | 154 | } |
155 | 155 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | { |
158 | 158 | $this->expectException(QueryException::class); |
159 | 159 | |
160 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?') |
|
160 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?') |
|
161 | 161 | ->setParameter(1, 'jwage') |
162 | 162 | ->getSingleResult(); |
163 | 163 | } |
@@ -168,11 +168,11 @@ discard block |
||
168 | 168 | $parameters->add(new Parameter(1, 'jwage')); |
169 | 169 | $parameters->add(new Parameter(2, 'active')); |
170 | 170 | |
171 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
|
171 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2') |
|
172 | 172 | ->setParameters($parameters) |
173 | 173 | ->getResult(); |
174 | 174 | |
175 | - $extractValue = static function (Parameter $parameter) { |
|
175 | + $extractValue = static function(Parameter $parameter) { |
|
176 | 176 | return $parameter->getValue(); |
177 | 177 | }; |
178 | 178 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | { |
187 | 187 | $parameters = [1 => 'jwage', 2 => 'active']; |
188 | 188 | |
189 | - $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
|
189 | + $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u WHERE u.name = ?1 AND u.status = ?2') |
|
190 | 190 | ->setParameters($parameters) |
191 | 191 | ->getResult(); |
192 | 192 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $this->em->clear(); |
217 | 217 | $articleId = $article1->id; |
218 | 218 | |
219 | - $query = $this->em->createQuery('select a from ' . CmsArticle::class . ' a WHERE a.topic = ?1'); |
|
219 | + $query = $this->em->createQuery('select a from '.CmsArticle::class.' a WHERE a.topic = ?1'); |
|
220 | 220 | $articles = $query->iterate(new ArrayCollection([new Parameter(1, 'Doctrine 2')]), Query::HYDRATE_ARRAY); |
221 | 221 | |
222 | 222 | $found = []; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $this->em->flush(); |
258 | 258 | $this->em->clear(); |
259 | 259 | |
260 | - $query = $this->em->createQuery('select a from ' . CmsArticle::class . ' a'); |
|
260 | + $query = $this->em->createQuery('select a from '.CmsArticle::class.' a'); |
|
261 | 261 | $articles = $query->iterate(); |
262 | 262 | |
263 | 263 | $iteratedCount = 0; |
@@ -379,8 +379,8 @@ discard block |
||
379 | 379 | { |
380 | 380 | for ($i = 0; $i < 5; $i++) { |
381 | 381 | $user = new CmsUser(); |
382 | - $user->name = 'Guilherme' . $i; |
|
383 | - $user->username = 'gblanco' . $i; |
|
382 | + $user->name = 'Guilherme'.$i; |
|
383 | + $user->username = 'gblanco'.$i; |
|
384 | 384 | $user->status = 'developer'; |
385 | 385 | $this->em->persist($user); |
386 | 386 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | $this->em->flush(); |
389 | 389 | $this->em->clear(); |
390 | 390 | |
391 | - $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
|
391 | + $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u') |
|
392 | 392 | ->setFirstResult(1) |
393 | 393 | ->setMaxResults(2) |
394 | 394 | ->getResult(); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | self::assertEquals('gblanco1', $data[0]->username); |
398 | 398 | self::assertEquals('gblanco2', $data[1]->username); |
399 | 399 | |
400 | - $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
|
400 | + $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u') |
|
401 | 401 | ->setFirstResult(3) |
402 | 402 | ->setMaxResults(2) |
403 | 403 | ->getResult(); |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | self::assertEquals('gblanco3', $data[0]->username); |
407 | 407 | self::assertEquals('gblanco4', $data[1]->username); |
408 | 408 | |
409 | - $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
|
409 | + $data = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u') |
|
410 | 410 | ->setFirstResult(3) |
411 | 411 | ->setMaxResults(2) |
412 | 412 | ->getScalarResult(); |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | $author = new CmsUser(); |
463 | 463 | |
464 | 464 | $author->name = 'anonymous'; |
465 | - $author->username = 'anon' . $i; |
|
465 | + $author->username = 'anon'.$i; |
|
466 | 466 | $author->status = 'here'; |
467 | 467 | $article->user = $author; |
468 | 468 | |
@@ -498,13 +498,13 @@ discard block |
||
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 | $fetchedUser = $query->getOneOrNullResult(); |
503 | 503 | |
504 | 504 | self::assertInstanceOf(CmsUser::class, $fetchedUser); |
505 | 505 | self::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 | |
510 | 510 | self::assertEquals('gblanco', $fetchedUsername); |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | $this->putTripAroundEurope(); |
114 | 114 | |
115 | 115 | $dql = 'SELECT t, p, c ' |
116 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
117 | - . 'INNER JOIN t.pois p ' |
|
118 | - . 'INNER JOIN p.country c'; |
|
116 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
117 | + . 'INNER JOIN t.pois p ' |
|
118 | + . 'INNER JOIN p.country c'; |
|
119 | 119 | |
120 | 120 | $tours = $this->em->createQuery($dql)->getResult(); |
121 | 121 | |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | $this->putTripAroundEurope(); |
135 | 135 | |
136 | 136 | $dql = 'SELECT t ' |
137 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
138 | - . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
139 | - . 'WHERE p MEMBER OF t.pois'; |
|
137 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
138 | + . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
139 | + . 'WHERE p MEMBER OF t.pois'; |
|
140 | 140 | |
141 | 141 | $query = $this->em->createQuery($dql); |
142 | 142 | $tours = $query->getResult(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $metadata, |
71 | 71 | Events::postLoad, |
72 | 72 | $entity, |
73 | - $this->callback(static function (LifecycleEventArgs $args) use ($entityManager, $entity) { |
|
73 | + $this->callback(static function(LifecycleEventArgs $args) use ($entityManager, $entity) { |
|
74 | 74 | return $entity === $args->getEntity() && $entityManager === $args->getObjectManager(); |
75 | 75 | }), |
76 | 76 | $listenersFlag |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->logicalOr($metadata1, $metadata2), |
139 | 139 | Events::postLoad, |
140 | 140 | $this->logicalOr($entity1, $entity2), |
141 | - $this->callback(static function (LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) { |
|
141 | + $this->callback(static function(LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) { |
|
142 | 142 | return in_array($args->getEntity(), [$entity1, $entity2], true) |
143 | 143 | && $entityManager === $args->getObjectManager(); |
144 | 144 | }), |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | self::isInstanceOf(CompanyEmployee::class) |
227 | 227 | ) |
228 | 228 | ) |
229 | - ->willReturnCallback(static function (array $id, CompanyEmployee $companyEmployee) { |
|
229 | + ->willReturnCallback(static function(array $id, CompanyEmployee $companyEmployee) { |
|
230 | 230 | $companyEmployee->setSalary(1000); // A property on the CompanyEmployee |
231 | 231 | $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson |
232 | 232 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | self::isInstanceOf(ComparableObject::class) |
289 | 289 | ) |
290 | 290 | ) |
291 | - ->willReturnCallback(static function (array $id, ComparableObject $comparableObject) { |
|
291 | + ->willReturnCallback(static function(array $id, ComparableObject $comparableObject) { |
|
292 | 292 | $comparableObject->setComparedFieldValue(json_encode($id)); |
293 | 293 | |
294 | 294 | return $comparableObject; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | return [ |
58 | 58 | $method->getName(), |
59 | 59 | [ |
60 | - static function () { |
|
60 | + static function() { |
|
61 | 61 | }, |
62 | 62 | ], |
63 | 63 | ]; |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | ]; |
1025 | 1025 | |
1026 | 1026 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
1027 | - ->createProxy(ECommerceShipping::class, static function () { |
|
1027 | + ->createProxy(ECommerceShipping::class, static function() { |
|
1028 | 1028 | self::fail('Proxy is not supposed to be lazy-loaded'); |
1029 | 1029 | }); |
1030 | 1030 | |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | ]; |
1076 | 1076 | |
1077 | 1077 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
1078 | - ->createProxy(ECommerceShipping::class, static function () { |
|
1078 | + ->createProxy(ECommerceShipping::class, static function() { |
|
1079 | 1079 | self::fail('Proxy is not supposed to be lazy-loaded'); |
1080 | 1080 | }); |
1081 | 1081 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | protected function loadDriver() |
30 | 30 | { |
31 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
31 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function testClassTableInheritanceDiscriminatorMap() : void |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function testValidateXmlSchema($xmlMappingFile) : void |
174 | 174 | { |
175 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
175 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
176 | 176 | $dom = new DOMDocument(); |
177 | 177 | |
178 | 178 | $dom->load($xmlMappingFile); |
@@ -182,14 +182,14 @@ discard block |
||
182 | 182 | |
183 | 183 | public static function dataValidSchema() |
184 | 184 | { |
185 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
185 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
186 | 186 | $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm']; |
187 | 187 | |
188 | - $list = array_filter($list, static function ($item) use ($invalid) { |
|
188 | + $list = array_filter($list, static function($item) use ($invalid) { |
|
189 | 189 | return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true); |
190 | 190 | }); |
191 | 191 | |
192 | - return array_map(static function ($item) { |
|
192 | + return array_map(static function($item) { |
|
193 | 193 | return [$item]; |
194 | 194 | }, $list); |
195 | 195 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | $query->free(); |
67 | 67 | } catch (Exception $e) { |
68 | - $this->fail($e->getMessage() . "\n" . $e->getTraceAsString()); |
|
68 | + $this->fail($e->getMessage()."\n".$e->getTraceAsString()); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | public function testAliasDoesNotExceedPlatformDefinedLength() : void |
1626 | 1626 | { |
1627 | 1627 | $this->assertSqlGeneration( |
1628 | - 'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m', |
|
1628 | + 'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m', |
|
1629 | 1629 | 'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0' |
1630 | 1630 | ); |
1631 | 1631 | } |
@@ -1658,12 +1658,12 @@ discard block |
||
1658 | 1658 | public function testSelectWithArithmeticExpressionBeforeField() : void |
1659 | 1659 | { |
1660 | 1660 | $this->assertSqlGeneration( |
1661 | - 'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
1661 | + 'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
1662 | 1662 | 'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0' |
1663 | 1663 | ); |
1664 | 1664 | |
1665 | 1665 | $this->assertSqlGeneration( |
1666 | - 'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
1666 | + 'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
1667 | 1667 | 'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0' |
1668 | 1668 | ); |
1669 | 1669 | } |
@@ -2340,8 +2340,8 @@ discard block |
||
2340 | 2340 | public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator) : void |
2341 | 2341 | { |
2342 | 2342 | $this->assertSqlGeneration( |
2343 | - 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0', |
|
2344 | - 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0' |
|
2343 | + 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0', |
|
2344 | + 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0' |
|
2345 | 2345 | ); |
2346 | 2346 | } |
2347 | 2347 | |
@@ -2360,7 +2360,7 @@ discard block |
||
2360 | 2360 | |
2361 | 2361 | public function getSql(SqlWalker $sqlWalker) |
2362 | 2362 | { |
2363 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')'; |
|
2363 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')'; |
|
2364 | 2364 | } |
2365 | 2365 | |
2366 | 2366 | public function parse(Parser $parser) |