@@ -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\Query; |
6 | 6 | |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function testAbstractSchemaNameSupportsClassnamesWithLeadingBackslash() |
33 | 33 | { |
34 | - $parser = $this->createParser('\\' . CmsUser::class); |
|
34 | + $parser = $this->createParser('\\'.CmsUser::class); |
|
35 | 35 | |
36 | - self::assertEquals('\\' . CmsUser::class, $parser->AbstractSchemaName()); |
|
36 | + self::assertEquals('\\'.CmsUser::class, $parser->AbstractSchemaName()); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -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 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | try { |
46 | 46 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
47 | 47 | } catch (\Exception $e) { |
48 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
48 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | { |
206 | 206 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
207 | 207 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
208 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
208 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
209 | 209 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
210 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
210 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
211 | 211 | |
212 | 212 | $identificationVariableDecl->joins[] = $join; |
213 | 213 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $userMetadata = $entityManager->getClassMetadata(CmsUser::class); |
217 | 217 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
218 | 218 | |
219 | - $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
219 | + $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable.'a', |
|
220 | 220 | [ |
221 | 221 | 'metadata' => $addressMetadata, |
222 | 222 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -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\Query; |
6 | 6 | |
@@ -88,6 +88,6 @@ discard block |
||
88 | 88 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
89 | 89 | { |
90 | 90 | // getParameter applies quoting automatically |
91 | - return $targetTableAlias . '.id = ' . $this->getParameter('id'); |
|
91 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
92 | 92 | } |
93 | 93 | } |
@@ -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\Persisters; |
6 | 6 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $method = new \ReflectionMethod($this->persister, 'getSelectConditionSQL'); |
94 | 94 | $method->setAccessible(true); |
95 | 95 | |
96 | - $sql = $method->invoke($this->persister, ['customInteger' => 1, 'child' => 1]); |
|
96 | + $sql = $method->invoke($this->persister, ['customInteger' => 1, 'child' => 1]); |
|
97 | 97 | |
98 | 98 | self::assertEquals('t0."customInteger" = ABS(?) AND t0."child_id" = ?', $sql); |
99 | 99 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Persisters; |
6 | 6 |
@@ -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\SchemaTool; |
6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $updateSql = $this->schemaTool->getUpdateSchemaSql([$class]); |
32 | 32 | |
33 | - $updateSql = array_filter($updateSql, function ($sql) { |
|
33 | + $updateSql = array_filter($updateSql, function($sql) { |
|
34 | 34 | return strpos($sql, 'DBAL483') !== false; |
35 | 35 | }); |
36 | 36 |
@@ -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\Locking; |
6 | 6 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $test = new OptimisticStandard(); |
119 | 119 | |
120 | 120 | for ($i = 0; $i < 5; $i++) { |
121 | - $test->name = 'test' . $i; |
|
121 | + $test->name = 'test'.$i; |
|
122 | 122 | |
123 | 123 | $this->em->persist($test); |
124 | 124 | $this->em->flush(); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $caughtException = null; |
253 | 253 | |
254 | 254 | try { |
255 | - $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp()-3600)); |
|
255 | + $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp() - 3600)); |
|
256 | 256 | |
257 | 257 | $this->em->lock($test, LockMode::OPTIMISTIC, $expectedVersionExpired); |
258 | 258 | } catch (OptimisticLockException $e) { |
@@ -212,7 +212,7 @@ |
||
212 | 212 | $this->expectExceptionMessage('The optimistic lock on an entity failed.'); |
213 | 213 | |
214 | 214 | $this->em->createQuery($dql) |
215 | - ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC) |
|
216 | - ->getSQL(); |
|
215 | + ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC) |
|
216 | + ->getSQL(); |
|
217 | 217 | } |
218 | 218 | } |
@@ -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\Locking; |
6 | 6 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $article = new CmsArticle(); |
90 | 90 | |
91 | 91 | $this->expectException(\InvalidArgumentException::class); |
92 | - $this->expectExceptionMessage('Entity ' . CmsArticle::class); |
|
92 | + $this->expectExceptionMessage('Entity '.CmsArticle::class); |
|
93 | 93 | |
94 | 94 | $this->em->lock($article, LockMode::OPTIMISTIC, $article->version + 1); |
95 | 95 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | $writeLockSql = $this->em->getConnection()->getDatabasePlatform()->getWriteLockSQL(); |
140 | 140 | |
141 | - if (! $writeLockSql) { |
|
141 | + if ( ! $writeLockSql) { |
|
142 | 142 | $this->markTestSkipped('Database Driver has no Write Lock support.'); |
143 | 143 | } |
144 | 144 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | $readLockSql = $this->em->getConnection()->getDatabasePlatform()->getReadLockSQL(); |
175 | 175 | |
176 | - if (! $readLockSql) { |
|
176 | + if ( ! $readLockSql) { |
|
177 | 177 | $this->markTestSkipped('Database Driver has no Write Lock support.'); |
178 | 178 | } |
179 | 179 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function testLockOptimisticNonVersionedThrowsExceptionInDQL() |
208 | 208 | { |
209 | - $dql = 'SELECT u FROM ' . CmsUser::class . " u WHERE u.username = 'gblanco'"; |
|
209 | + $dql = 'SELECT u FROM '.CmsUser::class." u WHERE u.username = 'gblanco'"; |
|
210 | 210 | |
211 | 211 | $this->expectException(OptimisticLockException::class); |
212 | 212 | $this->expectExceptionMessage('The optimistic lock on an entity failed.'); |
@@ -167,12 +167,12 @@ |
||
167 | 167 | $this->em->clear(); |
168 | 168 | |
169 | 169 | $dateTimeDb = $this->em->createQueryBuilder() |
170 | - ->select('d') |
|
171 | - ->from(DateTimeModel::class, 'd') |
|
172 | - ->where('d.datetime = ?1') |
|
173 | - ->setParameter(1, $date, DBALType::DATETIME) |
|
174 | - ->getQuery() |
|
175 | - ->getSingleResult(); |
|
170 | + ->select('d') |
|
171 | + ->from(DateTimeModel::class, 'd') |
|
172 | + ->where('d.datetime = ?1') |
|
173 | + ->setParameter(1, $date, DBALType::DATETIME) |
|
174 | + ->getQuery() |
|
175 | + ->getSingleResult(); |
|
176 | 176 | |
177 | 177 | self::assertInstanceOf(\DateTime::class, $dateTimeDb->datetime); |
178 | 178 | self::assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s')); |
@@ -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); |