@@ -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 | |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | $schemaDiff = $comparator->compare($fromSchema, $toSchema); |
85 | 85 | |
86 | 86 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
87 | - $sql = array_filter($sql, function ($sql) { |
|
87 | + $sql = array_filter($sql, function($sql) { |
|
88 | 88 | return strpos($sql, 'DROP') === false; |
89 | 89 | }); |
90 | 90 | |
91 | - self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql)); |
|
91 | + self::assertCount(0, $sql, 'SQL: '.implode(PHP_EOL, $sql)); |
|
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\Query; |
6 | 6 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $query->free(); |
36 | 36 | } catch (\Exception $e) { |
37 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
37 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | { |
77 | 77 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
78 | 78 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
79 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
79 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
80 | 80 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
81 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
81 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
82 | 82 | |
83 | 83 | $identificationVariableDecl->joins[] = $join; |
84 | 84 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
89 | 89 | |
90 | 90 | $this->setQueryComponent( |
91 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
91 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
92 | 92 | [ |
93 | 93 | 'metadata' => $addressMetadata, |
94 | 94 | '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\Functional; |
6 | 6 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | try { |
43 | 43 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
44 | 44 | } catch (\Exception $e) { |
45 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
45 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $condExpr = $whereClause->conditionalExpression; |
142 | 142 | |
143 | 143 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
144 | - if (! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
144 | + if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
145 | 145 | $condExpr = new Query\AST\ConditionalExpression([$condExpr]); |
146 | 146 | |
147 | 147 | $whereClause->conditionalExpression = $condExpr; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0]; |
165 | 165 | |
166 | 166 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
167 | - if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
167 | + if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
168 | 168 | $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]); |
169 | 169 | |
170 | 170 | $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm; |
@@ -202,9 +202,9 @@ discard block |
||
202 | 202 | { |
203 | 203 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
204 | 204 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
205 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
205 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
206 | 206 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
207 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
207 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
208 | 208 | |
209 | 209 | $identificationVariableDecl->joins[] = $join; |
210 | 210 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
215 | 215 | |
216 | 216 | $this->setQueryComponent( |
217 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
217 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
218 | 218 | [ |
219 | 219 | 'metadata' => $addressMetadata, |
220 | 220 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -1,26 +1,26 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests; |
6 | 6 | |
7 | 7 | error_reporting(E_ALL | E_STRICT); |
8 | 8 | date_default_timezone_set('UTC'); |
9 | 9 | |
10 | -if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) { |
|
10 | +if (file_exists(__DIR__.'/../../../vendor/autoload.php')) { |
|
11 | 11 | // dependencies were installed via composer - this is the main project |
12 | - require __DIR__ . '/../../../vendor/autoload.php'; |
|
13 | -} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) { |
|
12 | + require __DIR__.'/../../../vendor/autoload.php'; |
|
13 | +} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) { |
|
14 | 14 | // installed as a dependency in `vendor` |
15 | - require __DIR__ . '/../../../../../autoload.php'; |
|
15 | + require __DIR__.'/../../../../../autoload.php'; |
|
16 | 16 | } else { |
17 | 17 | throw new \Exception('Can\'t find autoload.php. Did you install dependencies via composer?'); |
18 | 18 | } |
19 | 19 | |
20 | -if (! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) { |
|
21 | - throw new \Exception('Could not create ' . __DIR__ . '/Proxies Folder.'); |
|
20 | +if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) { |
|
21 | + throw new \Exception('Could not create '.__DIR__.'/Proxies Folder.'); |
|
22 | 22 | } |
23 | 23 | |
24 | -if (! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) { |
|
25 | - throw new \Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.'); |
|
24 | +if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) { |
|
25 | + throw new \Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.'); |
|
26 | 26 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function testIndexByJoin() |
78 | 78 | { |
79 | 79 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' . |
80 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
80 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
81 | 81 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_OBJECT); |
82 | 82 | |
83 | 83 | self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books. |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | public function testIndexByToOneJoinSilentlyIgnored() |
102 | 102 | { |
103 | 103 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
104 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
104 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
105 | 105 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_OBJECT); |
106 | 106 | |
107 | 107 | self::assertInstanceOf(DDC618Book::class, $result[0]); |
108 | 108 | self::assertInstanceOf(DDC618Author::class, $result[0]->author); |
109 | 109 | |
110 | 110 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
111 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
111 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
112 | 112 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_ARRAY); |
113 | 113 | |
114 | 114 | self::assertEquals('Alice', $result[0]['author']['name']); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | public function testCombineIndexBy() |
121 | 121 | { |
122 | 122 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' . |
123 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
123 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
124 | 124 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_OBJECT); |
125 | 125 | |
126 | 126 | self::assertArrayHasKey(11, $result); // Alice |
@@ -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\Ticket; |
6 | 6 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function testIndexByJoin() |
78 | 78 | { |
79 | - $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' . |
|
79 | + $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '. |
|
80 | 80 | 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
81 | 81 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_OBJECT); |
82 | 82 | |
@@ -100,14 +100,14 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function testIndexByToOneJoinSilentlyIgnored() |
102 | 102 | { |
103 | - $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
|
103 | + $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
|
104 | 104 | 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
105 | 105 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_OBJECT); |
106 | 106 | |
107 | 107 | self::assertInstanceOf(DDC618Book::class, $result[0]); |
108 | 108 | self::assertInstanceOf(DDC618Author::class, $result[0]->author); |
109 | 109 | |
110 | - $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
|
110 | + $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
|
111 | 111 | 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
112 | 112 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_ARRAY); |
113 | 113 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function testCombineIndexBy() |
121 | 121 | { |
122 | - $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' . |
|
122 | + $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '. |
|
123 | 123 | 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
124 | 124 | $result = $this->em->createQuery($dql)->getResult(Query::HYDRATE_OBJECT); |
125 | 125 |