@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $this->em->flush(); |
| 115 | 115 | $this->em->clear(); |
| 116 | 116 | |
| 117 | - $dql = 'SELECT p FROM ' . __NAMESPACE__ . '\DDC93Person p'; |
|
| 117 | + $dql = 'SELECT p FROM '.__NAMESPACE__.'\DDC93Person p'; |
|
| 118 | 118 | $persons = $this->em->createQuery($dql)->getResult(); |
| 119 | 119 | |
| 120 | 120 | self::assertCount(3, $persons); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | self::assertEquals('United States of America', $person->address->country->name); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - $dql = 'SELECT p FROM ' . __NAMESPACE__ . '\DDC93Person p'; |
|
| 130 | + $dql = 'SELECT p FROM '.__NAMESPACE__.'\DDC93Person p'; |
|
| 131 | 131 | $persons = $this->em->createQuery($dql)->getArrayResult(); |
| 132 | 132 | |
| 133 | 133 | foreach ($persons as $person) { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $this->em->flush(); |
| 153 | 153 | |
| 154 | 154 | // SELECT |
| 155 | - $selectDql = 'SELECT p FROM ' . __NAMESPACE__ . '\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country'; |
|
| 155 | + $selectDql = 'SELECT p FROM '.__NAMESPACE__.'\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country'; |
|
| 156 | 156 | $loadedPerson = $this->em->createQuery($selectDql) |
| 157 | 157 | ->setParameter('city', 'Karlsruhe') |
| 158 | 158 | ->setParameter('country', 'Germany') |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | ); |
| 168 | 168 | |
| 169 | 169 | // UPDATE |
| 170 | - $updateDql = 'UPDATE ' . __NAMESPACE__ . '\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city'; |
|
| 170 | + $updateDql = 'UPDATE '.__NAMESPACE__.'\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city'; |
|
| 171 | 171 | $this->em->createQuery($updateDql) |
| 172 | 172 | ->setParameter('street', 'Boo') |
| 173 | 173 | ->setParameter('country', 'DE') |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | self::assertEquals('DE', $person->address->country->name); |
| 180 | 180 | |
| 181 | 181 | // DELETE |
| 182 | - $this->em->createQuery('DELETE ' . __NAMESPACE__ . '\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country') |
|
| 182 | + $this->em->createQuery('DELETE '.__NAMESPACE__.'\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country') |
|
| 183 | 183 | ->setParameter('city', 'Karlsruhe') |
| 184 | 184 | ->setParameter('country', 'DE') |
| 185 | 185 | ->execute(); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $this->em->clear(); |
| 197 | 197 | |
| 198 | 198 | // Prove that the entity was persisted correctly. |
| 199 | - $dql = 'SELECT p FROM ' . __NAMESPACE__ . '\\DDC93Person p WHERE p.name = :name'; |
|
| 199 | + $dql = 'SELECT p FROM '.__NAMESPACE__.'\\DDC93Person p WHERE p.name = :name'; |
|
| 200 | 200 | |
| 201 | 201 | $person = $this->em->createQuery($dql) |
| 202 | 202 | ->setParameter('name', 'Karl') |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | // Clear the EM and prove that the embeddable can be the subject of a partial query. |
| 211 | 211 | $this->em->clear(); |
| 212 | 212 | |
| 213 | - $dql = 'SELECT PARTIAL p.{id,address.city} FROM ' . __NAMESPACE__ . '\\DDC93Person p WHERE p.name = :name'; |
|
| 213 | + $dql = 'SELECT PARTIAL p.{id,address.city} FROM '.__NAMESPACE__.'\\DDC93Person p WHERE p.name = :name'; |
|
| 214 | 214 | |
| 215 | 215 | $person = $this->em->createQuery($dql) |
| 216 | 216 | ->setParameter('name', 'Karl') |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | // Clear the EM and prove that the embeddable can be the subject of a partial query regardless of attributes positions. |
| 227 | 227 | $this->em->clear(); |
| 228 | 228 | |
| 229 | - $dql = 'SELECT PARTIAL p.{address.city, id} FROM ' . __NAMESPACE__ . '\\DDC93Person p WHERE p.name = :name'; |
|
| 229 | + $dql = 'SELECT PARTIAL p.{address.city, id} FROM '.__NAMESPACE__.'\\DDC93Person p WHERE p.name = :name'; |
|
| 230 | 230 | |
| 231 | 231 | $person = $this->em->createQuery($dql) |
| 232 | 232 | ->setParameter('name', 'Karl') |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $this->expectException(QueryException::class); |
| 246 | 246 | $this->expectExceptionMessage('no field or association named address.asdfasdf'); |
| 247 | 247 | |
| 248 | - $this->em->createQuery('SELECT p FROM ' . __NAMESPACE__ . '\\DDC93Person p WHERE p.address.asdfasdf IS NULL') |
|
| 248 | + $this->em->createQuery('SELECT p FROM '.__NAMESPACE__.'\\DDC93Person p WHERE p.address.asdfasdf IS NULL') |
|
| 249 | 249 | ->execute(); |
| 250 | 250 | } |
| 251 | 251 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $this->expectException(QueryException::class); |
| 255 | 255 | $this->expectExceptionMessage("no mapped field named 'address.asdfasdf'"); |
| 256 | 256 | |
| 257 | - $this->em->createQuery('SELECT PARTIAL p.{id,address.asdfasdf} FROM ' . __NAMESPACE__ . '\\DDC93Person p') |
|
| 257 | + $this->em->createQuery('SELECT PARTIAL p.{id,address.asdfasdf} FROM '.__NAMESPACE__.'\\DDC93Person p') |
|
| 258 | 258 | ->execute(); |
| 259 | 259 | } |
| 260 | 260 | |
@@ -316,15 +316,15 @@ discard block |
||
| 316 | 316 | $this->expectException(MappingException::class); |
| 317 | 317 | $this->expectExceptionMessage( |
| 318 | 318 | sprintf( |
| 319 | - 'Infinite nesting detected for embedded property %s::nested. ' . |
|
| 319 | + 'Infinite nesting detected for embedded property %s::nested. '. |
|
| 320 | 320 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
| 321 | - __NAMESPACE__ . '\\' . $declaredEmbeddableClassName |
|
| 321 | + __NAMESPACE__.'\\'.$declaredEmbeddableClassName |
|
| 322 | 322 | ) |
| 323 | 323 | ); |
| 324 | 324 | |
| 325 | 325 | $this->schemaTool->createSchema( |
| 326 | 326 | [ |
| 327 | - $this->em->getClassMetadata(__NAMESPACE__ . '\\' . $embeddableClassName), |
|
| 327 | + $this->em->getClassMetadata(__NAMESPACE__.'\\'.$embeddableClassName), |
|
| 328 | 328 | ] |
| 329 | 329 | ); |
| 330 | 330 | } |
@@ -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 | } |