@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $this->em->flush(); |
| 47 | 47 | |
| 48 | 48 | $asset->getAttributes() |
| 49 | - ->removeElement($attribute1); |
|
| 49 | + ->removeElement($attribute1); |
|
| 50 | 50 | |
| 51 | 51 | $idToBeRemoved = $attribute1->id; |
| 52 | 52 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $this->em->clear(); |
| 40 | 40 | |
| 41 | 41 | $history = $this->em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1') |
| 42 | - ->setParameter(1, $c2->id)->getSingleResult(); |
|
| 42 | + ->setParameter(1, $c2->id)->getSingleResult(); |
|
| 43 | 43 | |
| 44 | 44 | self::assertInstanceOf(DDC1250ClientHistory::class, $history); |
| 45 | 45 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->em->flush(); |
| 37 | 37 | $this->em->clear(); |
| 38 | 38 | |
| 39 | - $history = $this->em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1') |
|
| 39 | + $history = $this->em->createQuery('SELECT h FROM '.__NAMESPACE__.'\\DDC1250ClientHistory h WHERE h.id = ?1') |
|
| 40 | 40 | ->setParameter(1, $c2->id)->getSingleResult(); |
| 41 | 41 | |
| 42 | 42 | self::assertInstanceOf(DDC1250ClientHistory::class, $history); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | foreach ($props as $name => $prop) { |
| 52 | 52 | $ident += 4; |
| 53 | 53 | $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
| 54 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
| 54 | + . $this->dump($prop) . ',' . PHP_EOL; |
|
| 55 | 55 | $ident -= 4; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | foreach ($obj as $k => $v) { |
| 65 | 65 | $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
| 66 | - . $k . '" => ' . $this->dump($v) . ','; |
|
| 66 | + . $k . '" => ' . $this->dump($v) . ','; |
|
| 67 | 67 | $some = true; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -54,32 +54,32 @@ |
||
| 54 | 54 | $str = ''; |
| 55 | 55 | |
| 56 | 56 | if ($obj instanceof Node) { |
| 57 | - $str .= get_class($obj) . '(' . PHP_EOL; |
|
| 57 | + $str .= get_class($obj).'('.PHP_EOL; |
|
| 58 | 58 | $props = get_object_vars($obj); |
| 59 | 59 | |
| 60 | 60 | foreach ($props as $name => $prop) { |
| 61 | 61 | $ident += 4; |
| 62 | - $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
|
| 63 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
| 62 | + $str .= str_repeat(' ', $ident).'"'.$name.'": ' |
|
| 63 | + . $this->dump($prop).','.PHP_EOL; |
|
| 64 | 64 | $ident -= 4; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $str .= str_repeat(' ', $ident) . ')'; |
|
| 67 | + $str .= str_repeat(' ', $ident).')'; |
|
| 68 | 68 | } elseif (is_array($obj)) { |
| 69 | 69 | $ident += 4; |
| 70 | 70 | $str .= 'array('; |
| 71 | 71 | $some = false; |
| 72 | 72 | |
| 73 | 73 | foreach ($obj as $k => $v) { |
| 74 | - $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
|
| 75 | - . $k . '" => ' . $this->dump($v) . ','; |
|
| 74 | + $str .= PHP_EOL.str_repeat(' ', $ident).'"' |
|
| 75 | + . $k.'" => '.$this->dump($v).','; |
|
| 76 | 76 | $some = true; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $ident -= 4; |
| 80 | - $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; |
|
| 80 | + $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '').')'; |
|
| 81 | 81 | } elseif (is_object($obj)) { |
| 82 | - $str .= 'instanceof(' . get_class($obj) . ')'; |
|
| 82 | + $str .= 'instanceof('.get_class($obj).')'; |
|
| 83 | 83 | } else { |
| 84 | 84 | $str .= var_export($obj, true); |
| 85 | 85 | } |
@@ -21,13 +21,13 @@ discard block |
||
| 21 | 21 | protected function configure() |
| 22 | 22 | { |
| 23 | 23 | $this->setName('orm:info') |
| 24 | - ->setDescription('Show basic information about all mapped entities') |
|
| 25 | - ->setHelp(<<<'EOT' |
|
| 24 | + ->setDescription('Show basic information about all mapped entities') |
|
| 25 | + ->setHelp(<<<'EOT' |
|
| 26 | 26 | The <info>%command.name%</info> shows basic information about which |
| 27 | 27 | entities exist and possibly if their mapping information contains errors or |
| 28 | 28 | not. |
| 29 | 29 | EOT |
| 30 | - ); |
|
| 30 | + ); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | $entityManager = $this->getHelper('em')->getEntityManager(); |
| 42 | 42 | |
| 43 | 43 | $entityClassNames = $entityManager->getConfiguration() |
| 44 | - ->getMetadataDriverImpl() |
|
| 45 | - ->getAllClassNames(); |
|
| 44 | + ->getMetadataDriverImpl() |
|
| 45 | + ->getAllClassNames(); |
|
| 46 | 46 | |
| 47 | 47 | if (! $entityClassNames) { |
| 48 | 48 | $ui->caution( |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | ->getMetadataDriverImpl() |
| 48 | 48 | ->getAllClassNames(); |
| 49 | 49 | |
| 50 | - if (! $entityClassNames) { |
|
| 50 | + if ( ! $entityClassNames) { |
|
| 51 | 51 | $ui->caution( |
| 52 | 52 | [ |
| 53 | 53 | 'You do not have any mapped Doctrine ORM entities according to the current configuration.', |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $qb = $this->em->createQueryBuilder(); |
| 28 | 28 | $qb->select('p', 'r') |
| 29 | - ->from(__NAMESPACE__ . '\DDC698Privilege', 'p') |
|
| 30 | - ->leftJoin('p.roles', 'r'); |
|
| 29 | + ->from(__NAMESPACE__ . '\DDC698Privilege', 'p') |
|
| 30 | + ->leftJoin('p.roles', 'r'); |
|
| 31 | 31 | |
| 32 | 32 | self::assertSQLEquals( |
| 33 | 33 | 'SELECT t0."privilegeID" AS c0, t0."name" AS c1, t1."roleID" AS c2, t1."name" AS c3, t1."shortName" AS c4 FROM "Privileges" t0 LEFT JOIN "RolePrivileges" t2 ON t0."privilegeID" = t2."privilegeID" LEFT JOIN "Roles" t1 ON t1."roleID" = t2."roleID"', |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | $qb = $this->em->createQueryBuilder(); |
| 29 | 29 | $qb->select('p', 'r') |
| 30 | - ->from(__NAMESPACE__ . '\DDC698Privilege', 'p') |
|
| 30 | + ->from(__NAMESPACE__.'\DDC698Privilege', 'p') |
|
| 31 | 31 | ->leftJoin('p.roles', 'r'); |
| 32 | 32 | |
| 33 | 33 | self::assertSQLEquals( |
@@ -88,18 +88,18 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | $q = $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a'); |
| 90 | 90 | $q2 = $q->expireQueryCache(true) |
| 91 | - ->setQueryCacheLifetime(3600) |
|
| 92 | - ->setQueryCacheDriver(null) |
|
| 93 | - ->expireResultCache(true) |
|
| 94 | - ->setHint('foo', 'bar') |
|
| 95 | - ->setHint('bar', 'baz') |
|
| 96 | - ->setParameter(1, 'bar') |
|
| 97 | - ->setParameters(new ArrayCollection([new Parameter(2, 'baz')])) |
|
| 98 | - ->setResultCacheDriver(null) |
|
| 99 | - ->setResultCacheId('foo') |
|
| 100 | - ->setDQL('foo') |
|
| 101 | - ->setFirstResult(10) |
|
| 102 | - ->setMaxResults(10); |
|
| 91 | + ->setQueryCacheLifetime(3600) |
|
| 92 | + ->setQueryCacheDriver(null) |
|
| 93 | + ->expireResultCache(true) |
|
| 94 | + ->setHint('foo', 'bar') |
|
| 95 | + ->setHint('bar', 'baz') |
|
| 96 | + ->setParameter(1, 'bar') |
|
| 97 | + ->setParameters(new ArrayCollection([new Parameter(2, 'baz')])) |
|
| 98 | + ->setResultCacheDriver(null) |
|
| 99 | + ->setResultCacheId('foo') |
|
| 100 | + ->setDQL('foo') |
|
| 101 | + ->setFirstResult(10) |
|
| 102 | + ->setMaxResults(10); |
|
| 103 | 103 | |
| 104 | 104 | self::assertSame($q2, $q); |
| 105 | 105 | } |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache()); |
| 257 | 257 | |
| 258 | 258 | $query = $this->em->createQuery('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u') |
| 259 | - ->useResultCache(true); |
|
| 259 | + ->useResultCache(true); |
|
| 260 | 260 | |
| 261 | 261 | /** @var DriverConnectionMock $driverConnectionMock */ |
| 262 | 262 | $driverConnectionMock = $this->em->getConnection() |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | */ |
| 338 | 338 | public function testGetParameterTypeJuggling() : void |
| 339 | 339 | { |
| 340 | - $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id = ?0'); |
|
| 340 | + $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id = ?0'); |
|
| 341 | 341 | |
| 342 | 342 | $query->setParameter(0, 0); |
| 343 | 343 | |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | */ |
| 352 | 352 | public function testSetParameterWithNameZeroIsNotOverridden() : void |
| 353 | 353 | { |
| 354 | - $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name'); |
|
| 354 | + $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name'); |
|
| 355 | 355 | |
| 356 | 356 | $query->setParameter(0, 0); |
| 357 | 357 | $query->setParameter('name', 'Doctrine'); |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | */ |
| 367 | 367 | public function testSetParameterWithNameZeroDoesNotOverrideAnotherParameter() : void |
| 368 | 368 | { |
| 369 | - $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name'); |
|
| 369 | + $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name'); |
|
| 370 | 370 | |
| 371 | 371 | $query->setParameter('name', 'Doctrine'); |
| 372 | 372 | $query->setParameter(0, 0); |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | */ |
| 382 | 382 | public function testSetParameterWithTypeJugglingWorks() : void |
| 383 | 383 | { |
| 384 | - $query = $this->em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name'); |
|
| 384 | + $query = $this->em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name'); |
|
| 385 | 385 | |
| 386 | 386 | $query->setParameter('0', 1); |
| 387 | 387 | $query->setParameter('name', 'Doctrine'); |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | { |
| 402 | 402 | $this->em->getConfiguration()->setResultCacheImpl(new ArrayCache()); |
| 403 | 403 | |
| 404 | - $query = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u'); |
|
| 404 | + $query = $this->em->createQuery('SELECT u FROM '.CmsUser::class.' u'); |
|
| 405 | 405 | $query->useResultCache(true); |
| 406 | 406 | $query->setResultCacheProfile(); |
| 407 | 407 | |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | ->expects(self::never()) |
| 420 | 420 | ->method('getSingleIdentifierValue'); |
| 421 | 421 | |
| 422 | - $query = $this->em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d WHERE d.datetime = :value'); |
|
| 422 | + $query = $this->em->createQuery('SELECT d FROM '.DateTimeModel::class.' d WHERE d.datetime = :value'); |
|
| 423 | 423 | |
| 424 | 424 | $query->setParameter('value', new DateTime(), Type::DATETIME); |
| 425 | 425 | |
@@ -86,8 +86,8 @@ |
||
| 86 | 86 | $this->em = $this->getTestEntityManager(); |
| 87 | 87 | $this->region = $this->createRegion(); |
| 88 | 88 | $this->collectionPersister = $this->getMockBuilder(CollectionPersister::class) |
| 89 | - ->setMethods($this->collectionPersisterMockMethods) |
|
| 90 | - ->getMock(); |
|
| 89 | + ->setMethods($this->collectionPersisterMockMethods) |
|
| 90 | + ->getMock(); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -103,8 +103,8 @@ |
||
| 103 | 103 | $this->em = $this->getTestEntityManager(); |
| 104 | 104 | $this->region = $this->createRegion(); |
| 105 | 105 | $this->entityPersister = $this->getMockBuilder(EntityPersister::class) |
| 106 | - ->setMethods($this->entityPersisterMockMethods) |
|
| 107 | - ->getMock(); |
|
| 106 | + ->setMethods($this->entityPersisterMockMethods) |
|
| 107 | + ->getMock(); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -104,8 +104,8 @@ |
||
| 104 | 104 | $routeId = $this->createPersistedRouteWithLegs(); |
| 105 | 105 | |
| 106 | 106 | $route = $this->em->createQuery('SELECT r, l FROM Doctrine\Tests\Models\Routing\RoutingRoute r JOIN r.legs l WHERE r.id = ?1') |
| 107 | - ->setParameter(1, $routeId) |
|
| 108 | - ->getSingleResult(); |
|
| 107 | + ->setParameter(1, $routeId) |
|
| 108 | + ->getSingleResult(); |
|
| 109 | 109 | |
| 110 | 110 | self::assertCount(2, $route->legs); |
| 111 | 111 | self::assertEquals('Berlin', $route->legs[0]->fromLocation->getName()); |