@@ -49,7 +49,7 @@ |
||
49 | 49 | /** |
50 | 50 | * Gets the SQL query. |
51 | 51 | * |
52 | - * @return mixed The built SQL query or an array of all SQL queries. |
|
52 | + * @return string The built SQL query or an array of all SQL queries. |
|
53 | 53 | * |
54 | 54 | * @override |
55 | 55 | */ |
@@ -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\ORM; |
6 | 6 |
@@ -20,7 +20,6 @@ |
||
20 | 20 | namespace Doctrine\ORM\Query; |
21 | 21 | |
22 | 22 | use Doctrine\Common\Collections\ArrayCollection; |
23 | - |
|
24 | 23 | use Doctrine\Common\Collections\Expr\ExpressionVisitor; |
25 | 24 | use Doctrine\Common\Collections\Expr\Comparison; |
26 | 25 | use Doctrine\Common\Collections\Expr\CompositeExpression; |
@@ -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\ORM\Query; |
6 | 6 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $expressionList[] = $this->dispatch($child); |
100 | 100 | } |
101 | 101 | |
102 | - switch($expr->getType()) { |
|
102 | + switch ($expr->getType()) { |
|
103 | 103 | case CompositeExpression::TYPE_AND: |
104 | 104 | return new Expr\Andx($expressionList); |
105 | 105 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | return new Expr\Orx($expressionList); |
108 | 108 | |
109 | 109 | default: |
110 | - throw new \RuntimeException("Unknown composite " . $expr->getType()); |
|
110 | + throw new \RuntimeException("Unknown composite ".$expr->getType()); |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | throw new QueryException('No aliases are set before invoking walkComparison().'); |
122 | 122 | } |
123 | 123 | |
124 | - $field = $this->queryAliases[0] . '.' . $comparison->getField(); |
|
124 | + $field = $this->queryAliases[0].'.'.$comparison->getField(); |
|
125 | 125 | |
126 | - foreach($this->queryAliases as $alias) { |
|
127 | - if(strpos($comparison->getField() . '.', $alias . '.') === 0) { |
|
126 | + foreach ($this->queryAliases as $alias) { |
|
127 | + if (strpos($comparison->getField().'.', $alias.'.') === 0) { |
|
128 | 128 | $field = $comparison->getField(); |
129 | 129 | break; |
130 | 130 | } |
@@ -135,13 +135,13 @@ discard block |
||
135 | 135 | |
136 | 136 | foreach ($this->parameters as $parameter) { |
137 | 137 | if ($parameter->getName() === $parameterName) { |
138 | - $parameterName .= '_' . $parameterCount; |
|
138 | + $parameterName .= '_'.$parameterCount; |
|
139 | 139 | break; |
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
143 | 143 | $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); |
144 | - $placeholder = ':' . $parameterName; |
|
144 | + $placeholder = ':'.$parameterName; |
|
145 | 145 | |
146 | 146 | switch ($comparison->getOperator()) { |
147 | 147 | case Comparison::IN: |
@@ -168,17 +168,17 @@ discard block |
||
168 | 168 | |
169 | 169 | return $this->expr->neq($field, $placeholder); |
170 | 170 | case Comparison::CONTAINS: |
171 | - $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType()); |
|
171 | + $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType()); |
|
172 | 172 | $this->parameters[] = $parameter; |
173 | 173 | |
174 | 174 | return $this->expr->like($field, $placeholder); |
175 | 175 | case Comparison::STARTS_WITH: |
176 | - $parameter->setValue($parameter->getValue() . '%', $parameter->getType()); |
|
176 | + $parameter->setValue($parameter->getValue().'%', $parameter->getType()); |
|
177 | 177 | $this->parameters[] = $parameter; |
178 | 178 | |
179 | 179 | return $this->expr->like($field, $placeholder); |
180 | 180 | case Comparison::ENDS_WITH: |
181 | - $parameter->setValue('%' . $parameter->getValue(), $parameter->getType()); |
|
181 | + $parameter->setValue('%'.$parameter->getValue(), $parameter->getType()); |
|
182 | 182 | $this->parameters[] = $parameter; |
183 | 183 | |
184 | 184 | return $this->expr->like($field, $placeholder); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | ); |
195 | 195 | } |
196 | 196 | |
197 | - throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); |
|
197 | + throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator()); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 |
@@ -21,7 +21,6 @@ |
||
21 | 21 | |
22 | 22 | use Doctrine\Common\Collections\ArrayCollection; |
23 | 23 | use Doctrine\Common\Collections\Criteria; |
24 | - |
|
25 | 24 | use Doctrine\ORM\Query\Expr; |
26 | 25 | use Doctrine\ORM\Query\QueryExpressionVisitor; |
27 | 26 |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | /** |
610 | 610 | * Gets a (previously set) query parameter of the query being constructed. |
611 | 611 | * |
612 | - * @param mixed $key The key (index or name) of the bound parameter. |
|
612 | + * @param string $key The key (index or name) of the bound parameter. |
|
613 | 613 | * |
614 | 614 | * @return Query\Parameter|null The value of the bound parameter. |
615 | 615 | */ |
@@ -1097,7 +1097,6 @@ discard block |
||
1097 | 1097 | * ->andWhere('u.is_active = 1'); |
1098 | 1098 | * </code> |
1099 | 1099 | * |
1100 | - * @param mixed $where The query restrictions. |
|
1101 | 1100 | * |
1102 | 1101 | * @return self |
1103 | 1102 | * |
@@ -1130,7 +1129,6 @@ discard block |
||
1130 | 1129 | * ->orWhere('u.id = 2'); |
1131 | 1130 | * </code> |
1132 | 1131 | * |
1133 | - * @param mixed $where The WHERE statement. |
|
1134 | 1132 | * |
1135 | 1133 | * @return self |
1136 | 1134 | * |
@@ -1195,7 +1193,7 @@ discard block |
||
1195 | 1193 | * Specifies a restriction over the groups of the query. |
1196 | 1194 | * Replaces any previous having restrictions, if any. |
1197 | 1195 | * |
1198 | - * @param mixed $having The restriction over the groups. |
|
1196 | + * @param string $having The restriction over the groups. |
|
1199 | 1197 | * |
1200 | 1198 | * @return self |
1201 | 1199 | */ |
@@ -1212,7 +1210,7 @@ discard block |
||
1212 | 1210 | * Adds a restriction over the groups of the query, forming a logical |
1213 | 1211 | * conjunction with any existing having restrictions. |
1214 | 1212 | * |
1215 | - * @param mixed $having The restriction to append. |
|
1213 | + * @param string $having The restriction to append. |
|
1216 | 1214 | * |
1217 | 1215 | * @return self |
1218 | 1216 | */ |
@@ -1235,7 +1233,7 @@ discard block |
||
1235 | 1233 | * Adds a restriction over the groups of the query, forming a logical |
1236 | 1234 | * disjunction with any existing having restrictions. |
1237 | 1235 | * |
1238 | - * @param mixed $having The restriction to add. |
|
1236 | + * @param string $having The restriction to add. |
|
1239 | 1237 | * |
1240 | 1238 | * @return self |
1241 | 1239 | */ |
@@ -1454,7 +1452,7 @@ discard block |
||
1454 | 1452 | /** |
1455 | 1453 | * Resets DQL parts. |
1456 | 1454 | * |
1457 | - * @param array|null $parts |
|
1455 | + * @param string[] $parts |
|
1458 | 1456 | * |
1459 | 1457 | * @return self |
1460 | 1458 | */ |
@@ -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\ORM; |
6 | 6 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | public function setParameter($key, $value, $type = null) |
519 | 519 | { |
520 | 520 | $filteredParameters = $this->parameters->filter( |
521 | - function ($parameter) use ($key) |
|
521 | + function($parameter) use ($key) |
|
522 | 522 | { |
523 | 523 | /* @var Query\Parameter $parameter */ |
524 | 524 | // Must not be identical because of string to integer conversion |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | } |
527 | 527 | ); |
528 | 528 | |
529 | - if (! $filteredParameters->isEmpty()) { |
|
529 | + if ( ! $filteredParameters->isEmpty()) { |
|
530 | 530 | /* @var Query\Parameter $parameter */ |
531 | 531 | $parameter = $filteredParameters->first(); |
532 | 532 | $parameter->setValue($value, $type); |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | public function getParameter($key) |
600 | 600 | { |
601 | 601 | $filteredParameters = $this->parameters->filter( |
602 | - function ($parameter) use ($key) |
|
602 | + function($parameter) use ($key) |
|
603 | 603 | { |
604 | 604 | /* @var Query\Parameter $parameter */ |
605 | 605 | // Must not be identical because of string to integer conversion |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | } |
683 | 683 | |
684 | 684 | $isMultiple = is_array($this->dqlParts[$dqlPartName]) |
685 | - && !($dqlPartName == 'join' && !$append); |
|
685 | + && ! ($dqlPartName == 'join' && ! $append); |
|
686 | 686 | |
687 | 687 | // Allow adding any part retrieved from self::getDQLParts(). |
688 | 688 | if (is_array($dqlPart) && $dqlPartName != 'join') { |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | { |
900 | 900 | $rootAliases = $this->getRootAliases(); |
901 | 901 | |
902 | - if (!in_array($alias, $rootAliases)) { |
|
902 | + if ( ! in_array($alias, $rootAliases)) { |
|
903 | 903 | throw new Query\QueryException( |
904 | 904 | sprintf('Specified root alias %s must be set before invoking indexBy().', $alias) |
905 | 905 | ); |
@@ -1301,15 +1301,15 @@ discard block |
||
1301 | 1301 | foreach ($criteria->getOrderings() as $sort => $order) { |
1302 | 1302 | |
1303 | 1303 | $hasValidAlias = false; |
1304 | - foreach($allAliases as $alias) { |
|
1305 | - if(strpos($sort . '.', $alias . '.') === 0) { |
|
1304 | + foreach ($allAliases as $alias) { |
|
1305 | + if (strpos($sort.'.', $alias.'.') === 0) { |
|
1306 | 1306 | $hasValidAlias = true; |
1307 | 1307 | break; |
1308 | 1308 | } |
1309 | 1309 | } |
1310 | 1310 | |
1311 | - if(!$hasValidAlias) { |
|
1312 | - $sort = $allAliases[0] . '.' . $sort; |
|
1311 | + if ( ! $hasValidAlias) { |
|
1312 | + $sort = $allAliases[0].'.'.$sort; |
|
1313 | 1313 | } |
1314 | 1314 | |
1315 | 1315 | $this->addOrderBy($sort, $order); |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | private function getDQLForSelect() |
1383 | 1383 | { |
1384 | 1384 | $dql = 'SELECT' |
1385 | - . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '') |
|
1385 | + . ($this->dqlParts['distinct'] === true ? ' DISTINCT' : '') |
|
1386 | 1386 | . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); |
1387 | 1387 | |
1388 | 1388 | $fromParts = $this->getDQLPart('from'); |
@@ -1398,7 +1398,7 @@ discard block |
||
1398 | 1398 | |
1399 | 1399 | if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) { |
1400 | 1400 | foreach ($joinParts[$from->getAlias()] as $join) { |
1401 | - $fromClause .= ' ' . ((string) $join); |
|
1401 | + $fromClause .= ' '.((string) $join); |
|
1402 | 1402 | } |
1403 | 1403 | } |
1404 | 1404 |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | */ |
104 | 104 | private $joinRootAliases = []; |
105 | 105 | |
106 | - /** |
|
107 | - * Whether to use second level cache, if available. |
|
108 | - * |
|
109 | - * @var boolean |
|
110 | - */ |
|
106 | + /** |
|
107 | + * Whether to use second level cache, if available. |
|
108 | + * |
|
109 | + * @var boolean |
|
110 | + */ |
|
111 | 111 | protected $cacheable = false; |
112 | 112 | |
113 | 113 | /** |
@@ -1356,10 +1356,10 @@ discard block |
||
1356 | 1356 | */ |
1357 | 1357 | private function getDQLForDelete() |
1358 | 1358 | { |
1359 | - return 'DELETE' |
|
1360 | - . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1361 | - . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1362 | - . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1359 | + return 'DELETE' |
|
1360 | + . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1361 | + . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1362 | + . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1363 | 1363 | } |
1364 | 1364 | |
1365 | 1365 | /** |
@@ -1367,11 +1367,11 @@ discard block |
||
1367 | 1367 | */ |
1368 | 1368 | private function getDQLForUpdate() |
1369 | 1369 | { |
1370 | - return 'UPDATE' |
|
1371 | - . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1372 | - . $this->getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', ']) |
|
1373 | - . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1374 | - . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1370 | + return 'UPDATE' |
|
1371 | + . $this->getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1372 | + . $this->getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', ']) |
|
1373 | + . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1374 | + . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1375 | 1375 | } |
1376 | 1376 | |
1377 | 1377 | /** |
@@ -1380,8 +1380,8 @@ discard block |
||
1380 | 1380 | private function getDQLForSelect() |
1381 | 1381 | { |
1382 | 1382 | $dql = 'SELECT' |
1383 | - . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '') |
|
1384 | - . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); |
|
1383 | + . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '') |
|
1384 | + . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); |
|
1385 | 1385 | |
1386 | 1386 | $fromParts = $this->getDQLPart('from'); |
1387 | 1387 | $joinParts = $this->getDQLPart('join'); |
@@ -1405,10 +1405,10 @@ discard block |
||
1405 | 1405 | } |
1406 | 1406 | |
1407 | 1407 | $dql .= implode(', ', $fromClauses) |
1408 | - . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1409 | - . $this->getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', ']) |
|
1410 | - . $this->getReducedDQLQueryPart('having', ['pre' => ' HAVING ']) |
|
1411 | - . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1408 | + . $this->getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1409 | + . $this->getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', ']) |
|
1410 | + . $this->getReducedDQLQueryPart('having', ['pre' => ' HAVING ']) |
|
1411 | + . $this->getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1412 | 1412 | |
1413 | 1413 | return $dql; |
1414 | 1414 | } |
@@ -1428,8 +1428,8 @@ discard block |
||
1428 | 1428 | } |
1429 | 1429 | |
1430 | 1430 | return ($options['pre'] ?? '') |
1431 | - . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) |
|
1432 | - . ($options['post'] ?? ''); |
|
1431 | + . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) |
|
1432 | + . ($options['post'] ?? ''); |
|
1433 | 1433 | } |
1434 | 1434 | |
1435 | 1435 | /** |
@@ -12,11 +12,11 @@ |
||
12 | 12 | use Entities\Address; |
13 | 13 | use Entities\User; |
14 | 14 | |
15 | -$em = require_once __DIR__ . '/bootstrap.php'; |
|
15 | +$em = require_once __DIR__.'/bootstrap.php'; |
|
16 | 16 | |
17 | 17 | ## PUT YOUR TEST CODE BELOW |
18 | 18 | |
19 | 19 | $user = new User; |
20 | 20 | $address = new Address; |
21 | 21 | |
22 | -echo 'Hello World!' . PHP_EOL; |
|
22 | +echo 'Hello World!'.PHP_EOL; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | foreach ($props as $name => $prop) { |
75 | 75 | $ident += 4; |
76 | 76 | $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
77 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
77 | + . $this->dump($prop) . ',' . PHP_EOL; |
|
78 | 78 | $ident -= 4; |
79 | 79 | } |
80 | 80 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | foreach ($obj as $k => $v) { |
88 | 88 | $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
89 | - . $k . '" => ' . $this->dump($v) . ','; |
|
89 | + . $k . '" => ' . $this->dump($v) . ','; |
|
90 | 90 | $some = true; |
91 | 91 | } |
92 | 92 |
@@ -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\ORM\Query\AST; |
6 | 6 | |
@@ -53,32 +53,32 @@ discard block |
||
53 | 53 | $str = ''; |
54 | 54 | |
55 | 55 | if ($obj instanceof Node) { |
56 | - $str .= get_class($obj) . '(' . PHP_EOL; |
|
56 | + $str .= get_class($obj).'('.PHP_EOL; |
|
57 | 57 | $props = get_object_vars($obj); |
58 | 58 | |
59 | 59 | foreach ($props as $name => $prop) { |
60 | 60 | $ident += 4; |
61 | - $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
|
62 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
61 | + $str .= str_repeat(' ', $ident).'"'.$name.'": ' |
|
62 | + . $this->dump($prop).','.PHP_EOL; |
|
63 | 63 | $ident -= 4; |
64 | 64 | } |
65 | 65 | |
66 | - $str .= str_repeat(' ', $ident) . ')'; |
|
66 | + $str .= str_repeat(' ', $ident).')'; |
|
67 | 67 | } elseif (is_array($obj)) { |
68 | 68 | $ident += 4; |
69 | 69 | $str .= 'array('; |
70 | 70 | $some = false; |
71 | 71 | |
72 | 72 | foreach ($obj as $k => $v) { |
73 | - $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
|
74 | - . $k . '" => ' . $this->dump($v) . ','; |
|
73 | + $str .= PHP_EOL.str_repeat(' ', $ident).'"' |
|
74 | + . $k.'" => '.$this->dump($v).','; |
|
75 | 75 | $some = true; |
76 | 76 | } |
77 | 77 | |
78 | 78 | $ident -= 4; |
79 | - $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; |
|
79 | + $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '').')'; |
|
80 | 80 | } elseif (is_object($obj)) { |
81 | - $str .= 'instanceof(' . get_class($obj) . ')'; |
|
81 | + $str .= 'instanceof('.get_class($obj).')'; |
|
82 | 82 | } else { |
83 | 83 | $str .= var_export($obj, true); |
84 | 84 | } |
@@ -138,8 +138,8 @@ |
||
138 | 138 | public function __toString() |
139 | 139 | { |
140 | 140 | return strtoupper($this->joinType) . ' JOIN ' . $this->join |
141 | - . ($this->alias ? ' ' . $this->alias : '') |
|
142 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
141 | + . ($this->alias ? ' ' . $this->alias : '') |
|
142 | + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | + . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
144 | 144 | } |
145 | 145 | } |
@@ -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\ORM\Query\Expr; |
6 | 6 | |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function __toString() |
124 | 124 | { |
125 | - return strtoupper($this->joinType) . ' JOIN ' . $this->join |
|
126 | - . ($this->alias ? ' ' . $this->alias : '') |
|
127 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
128 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
125 | + return strtoupper($this->joinType).' JOIN '.$this->join |
|
126 | + . ($this->alias ? ' '.$this->alias : '') |
|
127 | + . ($this->indexBy ? ' INDEX BY '.$this->indexBy : '') |
|
128 | + . ($this->condition ? ' '.strtoupper($this->conditionType).' '.$this->condition : ''); |
|
129 | 129 | } |
130 | 130 | } |
@@ -227,7 +227,9 @@ |
||
227 | 227 | $found = false; |
228 | 228 | |
229 | 229 | foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { |
230 | - if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue; |
|
230 | + if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
231 | + continue; |
|
232 | + } |
|
231 | 233 | |
232 | 234 | $this->addIndexByColumn($alias, $columnName); |
233 | 235 | $found = true; |
@@ -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\ORM\Query; |
6 | 6 |
@@ -58,8 +58,8 @@ |
||
58 | 58 | $entityManager = $this->getHelper('em')->getEntityManager(); |
59 | 59 | |
60 | 60 | $entityClassNames = $entityManager->getConfiguration() |
61 | - ->getMetadataDriverImpl() |
|
62 | - ->getAllClassNames(); |
|
61 | + ->getMetadataDriverImpl() |
|
62 | + ->getAllClassNames(); |
|
63 | 63 | |
64 | 64 | if (!$entityClassNames) { |
65 | 65 | throw new \Exception( |
@@ -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\ORM\Tools\Console\Command; |
6 | 6 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | ->getMetadataDriverImpl() |
47 | 47 | ->getAllClassNames(); |
48 | 48 | |
49 | - if (!$entityClassNames) { |
|
49 | + if ( ! $entityClassNames) { |
|
50 | 50 | throw new \Exception( |
51 | 51 | 'You do not have any mapped Doctrine ORM entities according to the current configuration. '. |
52 | 52 | 'If you have entities or mapping files you should check your mapping configuration for errors.' |
@@ -67,7 +67,7 @@ |
||
67 | 67 | public function resolve($className) |
68 | 68 | { |
69 | 69 | if (isset($this->instances[$className = trim($className, '\\')])) { |
70 | - return $this->instances[$className]; |
|
70 | + return $this->instances[$className]; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $this->instances[$className] = new $className(); |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |