@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | { |
| 415 | 415 | $aliases = $this->getRootAliases(); |
| 416 | 416 | |
| 417 | - if (! isset($aliases[0])) { |
|
| 417 | + if ( ! isset($aliases[0])) { |
|
| 418 | 418 | throw new \RuntimeException('No alias was set before invoking getRootAlias().'); |
| 419 | 419 | } |
| 420 | 420 | |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | public function getParameter($key) |
| 631 | 631 | { |
| 632 | 632 | $filteredParameters = $this->parameters->filter( |
| 633 | - function (Query\Parameter $parameter) use ($key) : bool { |
|
| 633 | + function(Query\Parameter $parameter) use ($key) : bool { |
|
| 634 | 634 | $parameterName = $parameter->getName(); |
| 635 | 635 | |
| 636 | 636 | return $key === $parameterName || (string) $key === (string) $parameterName; |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | { |
| 707 | 707 | if ($append && ($dqlPartName === 'where' || $dqlPartName === 'having')) { |
| 708 | 708 | throw new \InvalidArgumentException( |
| 709 | - "Using \$append = true does not have an effect with 'where' or 'having' " . |
|
| 709 | + "Using \$append = true does not have an effect with 'where' or 'having' ". |
|
| 710 | 710 | 'parts. See QueryBuilder#andWhere() for an example for correct usage.' |
| 711 | 711 | ); |
| 712 | 712 | } |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | { |
| 848 | 848 | $this->type = self::DELETE; |
| 849 | 849 | |
| 850 | - if (! $delete) { |
|
| 850 | + if ( ! $delete) { |
|
| 851 | 851 | return $this; |
| 852 | 852 | } |
| 853 | 853 | |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | { |
| 875 | 875 | $this->type = self::UPDATE; |
| 876 | 876 | |
| 877 | - if (! $update) { |
|
| 877 | + if ( ! $update) { |
|
| 878 | 878 | return $this; |
| 879 | 879 | } |
| 880 | 880 | |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | { |
| 930 | 930 | $rootAliases = $this->getRootAliases(); |
| 931 | 931 | |
| 932 | - if (! in_array($alias, $rootAliases, true)) { |
|
| 932 | + if ( ! in_array($alias, $rootAliases, true)) { |
|
| 933 | 933 | throw new Query\QueryException( |
| 934 | 934 | sprintf('Specified root alias %s must be set before invoking indexBy().', $alias) |
| 935 | 935 | ); |
@@ -1067,11 +1067,11 @@ discard block |
||
| 1067 | 1067 | */ |
| 1068 | 1068 | protected function leftJoinIfNotExists(string $rootAlias, string $property) |
| 1069 | 1069 | { |
| 1070 | - $alias = $this->getAliasByJoin($rootAlias . '.' . $property); |
|
| 1070 | + $alias = $this->getAliasByJoin($rootAlias.'.'.$property); |
|
| 1071 | 1071 | if (false === $alias) { |
| 1072 | 1072 | // Generate an alias |
| 1073 | - $alias = $rootAlias . '_' . $property . '_' . uniqid(); |
|
| 1074 | - $this->leftJoin($rootAlias . '.' . $property, $alias); |
|
| 1073 | + $alias = $rootAlias.'_'.$property.'_'.uniqid(); |
|
| 1074 | + $this->leftJoin($rootAlias.'.'.$property, $alias); |
|
| 1075 | 1075 | } |
| 1076 | 1076 | // it's either generated or found, but we want to know the alias |
| 1077 | 1077 | return $alias; |
@@ -1123,7 +1123,7 @@ discard block |
||
| 1123 | 1123 | */ |
| 1124 | 1124 | public function where($predicates) |
| 1125 | 1125 | { |
| 1126 | - if (! (func_num_args() === 1 && $predicates instanceof Expr\Composite)) { |
|
| 1126 | + if ( ! (func_num_args() === 1 && $predicates instanceof Expr\Composite)) { |
|
| 1127 | 1127 | $predicates = new Expr\Andx(func_get_args()); |
| 1128 | 1128 | } |
| 1129 | 1129 | |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | */ |
| 1243 | 1243 | public function having($having) |
| 1244 | 1244 | { |
| 1245 | - if (! (func_num_args() === 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) { |
|
| 1245 | + if ( ! (func_num_args() === 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) { |
|
| 1246 | 1246 | $having = new Expr\Andx(func_get_args()); |
| 1247 | 1247 | } |
| 1248 | 1248 | |
@@ -1340,7 +1340,7 @@ discard block |
||
| 1340 | 1340 | public function addCriteria(Criteria $criteria) |
| 1341 | 1341 | { |
| 1342 | 1342 | $allAliases = $this->getAllAliases(); |
| 1343 | - if (! isset($allAliases[0])) { |
|
| 1343 | + if ( ! isset($allAliases[0])) { |
|
| 1344 | 1344 | throw new Query\QueryException('No aliases are set before invoking addCriteria().'); |
| 1345 | 1345 | } |
| 1346 | 1346 | |
@@ -1358,14 +1358,14 @@ discard block |
||
| 1358 | 1358 | foreach ($criteria->getOrderings() as $sort => $order) { |
| 1359 | 1359 | $hasValidAlias = false; |
| 1360 | 1360 | foreach ($allAliases as $alias) { |
| 1361 | - if (strpos($sort . '.', $alias . '.') === 0) { |
|
| 1361 | + if (strpos($sort.'.', $alias.'.') === 0) { |
|
| 1362 | 1362 | $hasValidAlias = true; |
| 1363 | 1363 | break; |
| 1364 | 1364 | } |
| 1365 | 1365 | } |
| 1366 | 1366 | |
| 1367 | - if (! $hasValidAlias) { |
|
| 1368 | - $sort = $allAliases[0] . '.' . $sort; |
|
| 1367 | + if ( ! $hasValidAlias) { |
|
| 1368 | + $sort = $allAliases[0].'.'.$sort; |
|
| 1369 | 1369 | } |
| 1370 | 1370 | |
| 1371 | 1371 | $this->addOrderBy($sort, $order); |
@@ -1439,7 +1439,7 @@ discard block |
||
| 1439 | 1439 | private function getDQLForSelect() |
| 1440 | 1440 | { |
| 1441 | 1441 | $dql = 'SELECT' |
| 1442 | - . ($this->dqlParts['distinct']===true ? ' DISTINCT' : '') |
|
| 1442 | + . ($this->dqlParts['distinct'] === true ? ' DISTINCT' : '') |
|
| 1443 | 1443 | . $this->getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); |
| 1444 | 1444 | |
| 1445 | 1445 | $fromParts = $this->getDQLPart('from'); |
@@ -1447,7 +1447,7 @@ discard block |
||
| 1447 | 1447 | $fromClauses = []; |
| 1448 | 1448 | |
| 1449 | 1449 | // Loop through all FROM clauses |
| 1450 | - if (! empty($fromParts)) { |
|
| 1450 | + if ( ! empty($fromParts)) { |
|
| 1451 | 1451 | $dql .= ' FROM '; |
| 1452 | 1452 | |
| 1453 | 1453 | foreach ($fromParts as $from) { |
@@ -1455,7 +1455,7 @@ discard block |
||
| 1455 | 1455 | |
| 1456 | 1456 | if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) { |
| 1457 | 1457 | foreach ($joinParts[$from->getAlias()] as $join) { |
| 1458 | - $fromClause .= ' ' . ((string) $join); |
|
| 1458 | + $fromClause .= ' '.((string) $join); |
|
| 1459 | 1459 | } |
| 1460 | 1460 | } |
| 1461 | 1461 | |