@@ -92,7 +92,7 @@ |
||
| 92 | 92 | public function testCreateQueryBuilderAliasValid() : void |
| 93 | 93 | { |
| 94 | 94 | $q = $this->em->createQueryBuilder() |
| 95 | - ->select('u')->from(CmsUser::class, 'u'); |
|
| 95 | + ->select('u')->from(CmsUser::class, 'u'); |
|
| 96 | 96 | $q2 = clone $q; |
| 97 | 97 | |
| 98 | 98 | self::assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u', $q->getQuery()->getDql()); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | public function testThrowsExceptionOnNonObjectValues($methodName) : void |
| 139 | 139 | { |
| 140 | 140 | $this->expectException(ORMInvalidArgumentException::class); |
| 141 | - $this->expectExceptionMessage('EntityManager#' . $methodName . '() expects parameter 1 to be an entity object, NULL given.'); |
|
| 141 | + $this->expectExceptionMessage('EntityManager#'.$methodName.'() expects parameter 1 to be an entity object, NULL given.'); |
|
| 142 | 142 | |
| 143 | 143 | $this->em->{$methodName}(null); |
| 144 | 144 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | { |
| 183 | 183 | self::assertSame( |
| 184 | 184 | $value, |
| 185 | - $this->em->transactional(function ($em) use ($value) { |
|
| 185 | + $this->em->transactional(function($em) use ($value) { |
|
| 186 | 186 | return $value; |
| 187 | 187 | }) |
| 188 | 188 | ); |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | public function testTransactionalReThrowsThrowables() : void |
| 216 | 216 | { |
| 217 | 217 | try { |
| 218 | - $this->em->transactional(function () { |
|
| 219 | - (function (array $value) { |
|
| 218 | + $this->em->transactional(function() { |
|
| 219 | + (function(array $value) { |
|
| 220 | 220 | // this only serves as an IIFE that throws a `TypeError` |
| 221 | 221 | })(null); |
| 222 | 222 | }); |
@@ -45,12 +45,12 @@ |
||
| 45 | 45 | |
| 46 | 46 | /** @var InverseSide $fetchedInverse */ |
| 47 | 47 | $fetchedInverse = $this->em->createQueryBuilder() |
| 48 | - ->select('inverse') |
|
| 49 | - ->from(InverseSide::class, 'inverse') |
|
| 50 | - ->andWhere('inverse.id = :id') |
|
| 51 | - ->setParameter('id', 'inverse') |
|
| 52 | - ->getQuery() |
|
| 53 | - ->getSingleResult(); |
|
| 48 | + ->select('inverse') |
|
| 49 | + ->from(InverseSide::class, 'inverse') |
|
| 50 | + ->andWhere('inverse.id = :id') |
|
| 51 | + ->setParameter('id', 'inverse') |
|
| 52 | + ->getQuery() |
|
| 53 | + ->getSingleResult(); |
|
| 54 | 54 | |
| 55 | 55 | self::assertInstanceOf(InverseSide::class, $fetchedInverse); |
| 56 | 56 | self::assertInstanceOf(OwningSide::class, $fetchedInverse->owning); |
@@ -19,13 +19,13 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $config = new Configuration(); |
| 21 | 21 | |
| 22 | - $config->setProxyDir(__DIR__ . '/../Tests/Proxies'); |
|
| 22 | + $config->setProxyDir(__DIR__.'/../Tests/Proxies'); |
|
| 23 | 23 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
| 24 | 24 | $config->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_EVAL); |
| 25 | 25 | $config->setMetadataDriverImpl( |
| 26 | 26 | $config->newDefaultAnnotationDriver([ |
| 27 | - realpath(__DIR__ . '/Models/Cache'), |
|
| 28 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
| 27 | + realpath(__DIR__.'/Models/Cache'), |
|
| 28 | + realpath(__DIR__.'/Models/GeoNames'), |
|
| 29 | 29 | ]) |
| 30 | 30 | ); |
| 31 | 31 | |
@@ -29,8 +29,8 @@ |
||
| 29 | 29 | $user = new CmsUser(); |
| 30 | 30 | $user->id = $i; |
| 31 | 31 | $user->status = 'user'; |
| 32 | - $user->username = 'user' . $i; |
|
| 33 | - $user->name = 'Mr.Smith-' . $i; |
|
| 32 | + $user->username = 'user'.$i; |
|
| 33 | + $user->name = 'Mr.Smith-'.$i; |
|
| 34 | 34 | $this->users[] = $user; |
| 35 | 35 | |
| 36 | 36 | $this->unitOfWork->registerManaged( |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | 'u__status' => 'developer', |
| 49 | 49 | 'u__username' => 'jwage', |
| 50 | 50 | 'u__name' => 'Jonathan', |
| 51 | - 'sclr0' => 'JWAGE' . $i, |
|
| 51 | + 'sclr0' => 'JWAGE'.$i, |
|
| 52 | 52 | 'p__phonenumber' => '91', |
| 53 | 53 | 'a__id' => $i, |
| 54 | 54 | ]; |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | for ($i = 1; $i <= 10000; ++$i) { |
| 40 | 40 | $user = new CMS\CmsUser(); |
| 41 | 41 | $user->status = 'user'; |
| 42 | - $user->username = 'user' . $i; |
|
| 43 | - $user->name = 'Mr.Smith-' . $i; |
|
| 42 | + $user->username = 'user'.$i; |
|
| 43 | + $user->name = 'Mr.Smith-'.$i; |
|
| 44 | 44 | |
| 45 | 45 | $this->users[$i] = $user; |
| 46 | 46 | } |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | // Yes, this is a lot of overhead, but I have no better solution other than |
| 54 | 54 | // completely mocking out the DB, which would be silly (query impact is |
| 55 | 55 | // necessarily part of our benchmarks) |
| 56 | - $this->entityManager->getConnection()->executeQuery('DELETE FROM ' . $this->tableName)->execute(); |
|
| 56 | + $this->entityManager->getConnection()->executeQuery('DELETE FROM '.$this->tableName)->execute(); |
|
| 57 | 57 | |
| 58 | 58 | foreach ($this->users as $key => $user) { |
| 59 | 59 | $this->entityManager->persist($user); |
| 60 | 60 | |
| 61 | - if (! ($key % 20)) { |
|
| 61 | + if ( ! ($key % 20)) { |
|
| 62 | 62 | $this->entityManager->flush(); |
| 63 | 63 | $this->entityManager->clear(); |
| 64 | 64 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | 'u__status' => 'developer', |
| 64 | 64 | 'u__username' => 'jwage', |
| 65 | 65 | 'u__name' => 'Jonathan', |
| 66 | - 'sclr0' => 'JWAGE' . $i, |
|
| 66 | + 'sclr0' => 'JWAGE'.$i, |
|
| 67 | 67 | 'p__phonenumber' => '91', |
| 68 | 68 | ]; |
| 69 | 69 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | public function fetchColumn($columnNumber = 0) |
| 44 | 44 | { |
| 45 | 45 | $row = current($this->resultSet); |
| 46 | - if (! is_array($row)) { |
|
| 46 | + if ( ! is_array($row)) { |
|
| 47 | 47 | return false; |
| 48 | 48 | } |
| 49 | 49 | $val = array_shift($row); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function getDatabasePlatform() |
| 35 | 35 | { |
| 36 | - if (! $this->platformMock) { |
|
| 36 | + if ( ! $this->platformMock) { |
|
| 37 | 37 | $this->platformMock = new DatabasePlatformMock(); |
| 38 | 38 | } |
| 39 | 39 | return $this->platformMock; |