@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | return new Expr\Orx($expressionList); |
| 96 | 96 | |
| 97 | 97 | default: |
| 98 | - throw new \RuntimeException('Unknown composite ' . $expr->getType()); |
|
| 98 | + throw new \RuntimeException('Unknown composite '.$expr->getType()); |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
@@ -104,14 +104,14 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function walkComparison(Comparison $comparison) |
| 106 | 106 | { |
| 107 | - if (! isset($this->queryAliases[0])) { |
|
| 107 | + if ( ! isset($this->queryAliases[0])) { |
|
| 108 | 108 | throw new QueryException('No aliases are set before invoking walkComparison().'); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - $field = $this->queryAliases[0] . '.' . $comparison->getField(); |
|
| 111 | + $field = $this->queryAliases[0].'.'.$comparison->getField(); |
|
| 112 | 112 | |
| 113 | 113 | foreach ($this->queryAliases as $alias) { |
| 114 | - if (strpos($comparison->getField() . '.', $alias . '.') === 0) { |
|
| 114 | + if (strpos($comparison->getField().'.', $alias.'.') === 0) { |
|
| 115 | 115 | $field = $comparison->getField(); |
| 116 | 116 | break; |
| 117 | 117 | } |
@@ -122,13 +122,13 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | foreach ($this->parameters as $parameter) { |
| 124 | 124 | if ($parameter->getName() === $parameterName) { |
| 125 | - $parameterName .= '_' . $parameterCount; |
|
| 125 | + $parameterName .= '_'.$parameterCount; |
|
| 126 | 126 | break; |
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); |
| 131 | - $placeholder = ':' . $parameterName; |
|
| 131 | + $placeholder = ':'.$parameterName; |
|
| 132 | 132 | |
| 133 | 133 | switch ($comparison->getOperator()) { |
| 134 | 134 | case Comparison::IN: |
@@ -155,17 +155,17 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | return $this->expr->neq($field, $placeholder); |
| 157 | 157 | case Comparison::CONTAINS: |
| 158 | - $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType()); |
|
| 158 | + $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType()); |
|
| 159 | 159 | $this->parameters[] = $parameter; |
| 160 | 160 | |
| 161 | 161 | return $this->expr->like($field, $placeholder); |
| 162 | 162 | case Comparison::STARTS_WITH: |
| 163 | - $parameter->setValue($parameter->getValue() . '%', $parameter->getType()); |
|
| 163 | + $parameter->setValue($parameter->getValue().'%', $parameter->getType()); |
|
| 164 | 164 | $this->parameters[] = $parameter; |
| 165 | 165 | |
| 166 | 166 | return $this->expr->like($field, $placeholder); |
| 167 | 167 | case Comparison::ENDS_WITH: |
| 168 | - $parameter->setValue('%' . $parameter->getValue(), $parameter->getType()); |
|
| 168 | + $parameter->setValue('%'.$parameter->getValue(), $parameter->getType()); |
|
| 169 | 169 | $this->parameters[] = $parameter; |
| 170 | 170 | |
| 171 | 171 | return $this->expr->like($field, $placeholder); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | ); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - throw new \RuntimeException('Unknown comparison operator: ' . $comparison->getOperator()); |
|
| 184 | + throw new \RuntimeException('Unknown comparison operator: '.$comparison->getOperator()); |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | public function add($sort, $order = null) |
| 46 | 46 | { |
| 47 | 47 | $order = ! $order ? 'ASC' : $order; |
| 48 | - $this->parts[] = $sort . ' ' . $order; |
|
| 48 | + $this->parts[] = $sort.' '.$order; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -69,6 +69,6 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function __toString() |
| 71 | 71 | { |
| 72 | - return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; |
|
| 72 | + return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator; |
|
| 73 | 73 | } |
| 74 | 74 | } |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function add($arg) |
| 64 | 64 | { |
| 65 | - if ($arg !== null && (! $arg instanceof self || $arg->count() > 0)) { |
|
| 65 | + if ($arg !== null && ( ! $arg instanceof self || $arg->count() > 0)) { |
|
| 66 | 66 | // If we decide to keep Expr\Base instances, we can use this check |
| 67 | - if (! is_string($arg)) { |
|
| 67 | + if ( ! is_string($arg)) { |
|
| 68 | 68 | $class = get_class($arg); |
| 69 | 69 | |
| 70 | - if (! in_array($class, $this->allowedClasses, true)) { |
|
| 70 | + if ( ! in_array($class, $this->allowedClasses, true)) { |
|
| 71 | 71 | throw new \InvalidArgumentException( |
| 72 | 72 | sprintf("Expression of type '%s' not allowed in this context.", $class) |
| 73 | 73 | ); |
@@ -97,6 +97,6 @@ discard block |
||
| 97 | 97 | return (string) $this->parts[0]; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; |
|
| 100 | + return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator; |
|
| 101 | 101 | } |
| 102 | 102 | } |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public static function noDispatchForNode($node) |
| 21 | 21 | { |
| 22 | - return new self('Double-dispatch for node ' . get_class($node) . ' is not supported.'); |
|
| 22 | + return new self('Double-dispatch for node '.get_class($node).' is not supported.'); |
|
| 23 | 23 | } |
| 24 | 24 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $tableAlias = $sqlWalker->getSQLTableAlias($tableName, $dqlAlias); |
| 69 | 69 | $quotedColumnName = $platform->quoteIdentifier($joinColumn->getColumnName()); |
| 70 | 70 | |
| 71 | - return $tableAlias . '.' . $quotedColumnName; |
|
| 71 | + return $tableAlias.'.'.$quotedColumnName; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); |
| 45 | 45 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
| 46 | 46 | |
| 47 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
| 47 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
| 48 | 48 | |
| 49 | 49 | $owningAssociation = $targetClass->getProperty($association->getMappedBy()); |
| 50 | 50 | $first = true; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | // join to target table |
| 81 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' WHERE '; |
|
| 81 | + $sql .= $joinTableName.' '.$joinTableAlias.' WHERE '; |
|
| 82 | 82 | |
| 83 | 83 | $joinColumns = $association->isOwningSide() |
| 84 | 84 | ? $joinTable->getJoinColumns() |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - return '(' . $sql . ')'; |
|
| 107 | + return '('.$sql.')'; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function getSql(SqlWalker $sqlWalker) |
| 25 | 25 | { |
| 26 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( |
|
| 26 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression( |
|
| 27 | 27 | $this->simpleArithmeticExpression |
| 28 | - ) . ')'; |
|
| 28 | + ).')'; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | public function countDistinct($x) |
| 254 | 254 | { |
| 255 | - return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')'; |
|
| 255 | + return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')'; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | /** |
@@ -428,13 +428,13 @@ discard block |
||
| 428 | 428 | { |
| 429 | 429 | if (is_array($y)) { |
| 430 | 430 | foreach ($y as &$literal) { |
| 431 | - if (! ($literal instanceof Expr\Literal)) { |
|
| 431 | + if ( ! ($literal instanceof Expr\Literal)) { |
|
| 432 | 432 | $literal = $this->quoteLiteral($literal); |
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | - return new Expr\Func($x . ' IN', (array) $y); |
|
| 437 | + return new Expr\Func($x.' IN', (array) $y); |
|
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | /** |
@@ -449,13 +449,13 @@ discard block |
||
| 449 | 449 | { |
| 450 | 450 | if (is_array($y)) { |
| 451 | 451 | foreach ($y as &$literal) { |
| 452 | - if (! ($literal instanceof Expr\Literal)) { |
|
| 452 | + if ( ! ($literal instanceof Expr\Literal)) { |
|
| 453 | 453 | $literal = $this->quoteLiteral($literal); |
| 454 | 454 | } |
| 455 | 455 | } |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - return new Expr\Func($x . ' NOT IN', (array) $y); |
|
| 458 | + return new Expr\Func($x.' NOT IN', (array) $y); |
|
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | /** |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | */ |
| 468 | 468 | public function isNull($x) |
| 469 | 469 | { |
| 470 | - return $x . ' IS NULL'; |
|
| 470 | + return $x.' IS NULL'; |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | /** |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | */ |
| 480 | 480 | public function isNotNull($x) |
| 481 | 481 | { |
| 482 | - return $x . ' IS NOT NULL'; |
|
| 482 | + return $x.' IS NOT NULL'; |
|
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | /** |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | return $literal ? 'true' : 'false'; |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | - return "'" . str_replace("'", "''", $literal) . "'"; |
|
| 606 | + return "'".str_replace("'", "''", $literal)."'"; |
|
| 607 | 607 | } |
| 608 | 608 | |
| 609 | 609 | /** |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | */ |
| 618 | 618 | public function between($val, $x, $y) |
| 619 | 619 | { |
| 620 | - return $val . ' BETWEEN ' . $x . ' AND ' . $y; |
|
| 620 | + return $val.' BETWEEN '.$x.' AND '.$y; |
|
| 621 | 621 | } |
| 622 | 622 | |
| 623 | 623 | /** |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $classMetadata = $this->em->getClassMetadata($class); |
| 124 | 124 | $platform = $this->em->getConnection()->getDatabasePlatform(); |
| 125 | 125 | |
| 126 | - if (! $this->isInheritanceSupported($classMetadata)) { |
|
| 126 | + if ( ! $this->isInheritanceSupported($classMetadata)) { |
|
| 127 | 127 | throw new \InvalidArgumentException( |
| 128 | 128 | 'ResultSetMapping builder does not currently support your inheritance scheme.' |
| 129 | 129 | ); |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - if (! $joinColumn->getType()) { |
|
| 166 | + if ( ! $joinColumn->getType()) { |
|
| 167 | 167 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 168 | 168 | } |
| 169 | 169 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | { |
| 203 | 203 | switch ($mode) { |
| 204 | 204 | case self::COLUMN_RENAMING_INCREMENT: |
| 205 | - return $columnName . $this->sqlCounter++; |
|
| 205 | + return $columnName.$this->sqlCounter++; |
|
| 206 | 206 | |
| 207 | 207 | case self::COLUMN_RENAMING_CUSTOM: |
| 208 | 208 | return $customRenameColumns[$columnName] ?? $columnName; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $sql .= ', '; |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | - $sql .= $tableAlias . '.'; |
|
| 236 | + $sql .= $tableAlias.'.'; |
|
| 237 | 237 | |
| 238 | 238 | if (isset($this->fieldMappings[$columnName])) { |
| 239 | 239 | $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $sql .= $this->discriminatorColumns[$dqlAlias]; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - $sql .= ' AS ' . $columnName; |
|
| 248 | + $sql .= ' AS '.$columnName; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | return $sql; |