@@ -33,6 +33,6 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public static function noDispatchForNode($node) |
| 35 | 35 | { |
| 36 | - return new self("Double-dispatch for node " . get_class($node) . " is not supported."); |
|
| 36 | + return new self("Double-dispatch for node ".get_class($node)." is not supported."); |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -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 | |
@@ -68,32 +68,32 @@ |
||
| 68 | 68 | $str = ''; |
| 69 | 69 | |
| 70 | 70 | if ($obj instanceof Node) { |
| 71 | - $str .= get_class($obj) . '(' . PHP_EOL; |
|
| 71 | + $str .= get_class($obj).'('.PHP_EOL; |
|
| 72 | 72 | $props = get_object_vars($obj); |
| 73 | 73 | |
| 74 | 74 | foreach ($props as $name => $prop) { |
| 75 | 75 | $ident += 4; |
| 76 | - $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
|
| 77 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
| 76 | + $str .= str_repeat(' ', $ident).'"'.$name.'": ' |
|
| 77 | + . $this->dump($prop).','.PHP_EOL; |
|
| 78 | 78 | $ident -= 4; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - $str .= str_repeat(' ', $ident) . ')'; |
|
| 81 | + $str .= str_repeat(' ', $ident).')'; |
|
| 82 | 82 | } else if (is_array($obj)) { |
| 83 | 83 | $ident += 4; |
| 84 | 84 | $str .= 'array('; |
| 85 | 85 | $some = false; |
| 86 | 86 | |
| 87 | 87 | foreach ($obj as $k => $v) { |
| 88 | - $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
|
| 89 | - . $k . '" => ' . $this->dump($v) . ','; |
|
| 88 | + $str .= PHP_EOL.str_repeat(' ', $ident).'"' |
|
| 89 | + . $k.'" => '.$this->dump($v).','; |
|
| 90 | 90 | $some = true; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $ident -= 4; |
| 94 | - $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; |
|
| 94 | + $str .= ($some ? PHP_EOL.str_repeat(' ', $ident) : '').')'; |
|
| 95 | 95 | } else if (is_object($obj)) { |
| 96 | - $str .= 'instanceof(' . get_class($obj) . ')'; |
|
| 96 | + $str .= 'instanceof('.get_class($obj).')'; |
|
| 97 | 97 | } else { |
| 98 | 98 | $str .= var_export($obj, true); |
| 99 | 99 | } |
@@ -86,9 +86,9 @@ |
||
| 86 | 86 | $tableName = $sqlWalker->getEntityManager()->getClassMetadata($assoc['sourceEntity'])->getTableName(); |
| 87 | 87 | |
| 88 | 88 | $tableAlias = $sqlWalker->getSQLTableAlias($tableName, $dqlAlias); |
| 89 | - $columnName = $quoteStrategy->getJoinColumnName($joinColumn, $targetEntity, $platform); |
|
| 89 | + $columnName = $quoteStrategy->getJoinColumnName($joinColumn, $targetEntity, $platform); |
|
| 90 | 90 | |
| 91 | - return $tableAlias . '.' . $columnName; |
|
| 91 | + return $tableAlias.'.'.$columnName; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | if ($first) $first = false; else $sql .= ' AND '; |
| 71 | 71 | |
| 72 | 72 | $sql .= $targetTableAlias . '.' . $sourceColumn |
| 73 | - . ' = ' |
|
| 74 | - . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
| 73 | + . ' = ' |
|
| 74 | + . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
| 75 | 75 | } |
| 76 | 76 | } else { // many-to-many |
| 77 | 77 | $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | $sql .= $joinTableAlias . '.' . $joinColumn['name'] |
| 103 | - . ' = ' |
|
| 104 | - . $sourceTableAlias . '.' . $sourceColumnName; |
|
| 103 | + . ' = ' |
|
| 104 | + . $sourceTableAlias . '.' . $sourceColumnName; |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); |
| 61 | 61 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
| 62 | 62 | |
| 63 | - $sql .= $quoteStrategy->getTableName($targetClass, $platform) . ' ' . $targetTableAlias . ' WHERE '; |
|
| 63 | + $sql .= $quoteStrategy->getTableName($targetClass, $platform).' '.$targetTableAlias.' WHERE '; |
|
| 64 | 64 | |
| 65 | 65 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; |
| 66 | 66 | |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
| 70 | 70 | if ($first) $first = false; else $sql .= ' AND '; |
| 71 | 71 | |
| 72 | - $sql .= $targetTableAlias . '.' . $sourceColumn |
|
| 72 | + $sql .= $targetTableAlias.'.'.$sourceColumn |
|
| 73 | 73 | . ' = ' |
| 74 | - . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
| 74 | + . $sourceTableAlias.'.'.$quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); |
|
| 75 | 75 | } |
| 76 | 76 | } else { // many-to-many |
| 77 | 77 | $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
| 85 | 85 | |
| 86 | 86 | // join to target table |
| 87 | - $sql .= $quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $platform) . ' ' . $joinTableAlias . ' WHERE '; |
|
| 87 | + $sql .= $quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $platform).' '.$joinTableAlias.' WHERE '; |
|
| 88 | 88 | |
| 89 | 89 | $joinColumns = $assoc['isOwningSide'] |
| 90 | 90 | ? $joinTable['joinColumns'] |
@@ -99,13 +99,13 @@ discard block |
||
| 99 | 99 | $class->fieldNames[$joinColumn['referencedColumnName']], $class, $platform |
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | - $sql .= $joinTableAlias . '.' . $joinColumn['name'] |
|
| 102 | + $sql .= $joinTableAlias.'.'.$joinColumn['name'] |
|
| 103 | 103 | . ' = ' |
| 104 | - . $sourceTableAlias . '.' . $sourceColumnName; |
|
| 104 | + . $sourceTableAlias.'.'.$sourceColumnName; |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - return '(' . $sql . ')'; |
|
| 108 | + return '('.$sql.')'; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -67,7 +67,11 @@ discard block |
||
| 67 | 67 | $first = true; |
| 68 | 68 | |
| 69 | 69 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
| 70 | - if ($first) $first = false; else $sql .= ' AND '; |
|
| 70 | + if ($first) { |
|
| 71 | + $first = false; |
|
| 72 | + } else { |
|
| 73 | + $sql .= ' AND '; |
|
| 74 | + } |
|
| 71 | 75 | |
| 72 | 76 | $sql .= $targetTableAlias . '.' . $sourceColumn |
| 73 | 77 | . ' = ' |
@@ -93,7 +97,11 @@ discard block |
||
| 93 | 97 | $first = true; |
| 94 | 98 | |
| 95 | 99 | foreach ($joinColumns as $joinColumn) { |
| 96 | - if ($first) $first = false; else $sql .= ' AND '; |
|
| 100 | + if ($first) { |
|
| 101 | + $first = false; |
|
| 102 | + } else { |
|
| 103 | + $sql .= ' AND '; |
|
| 104 | + } |
|
| 97 | 105 | |
| 98 | 106 | $sourceColumnName = $quoteStrategy->getColumnName( |
| 99 | 107 | $class->fieldNames[$joinColumn['referencedColumnName']], $class, $platform |
@@ -44,9 +44,9 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) |
| 46 | 46 | { |
| 47 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( |
|
| 47 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression( |
|
| 48 | 48 | $this->simpleArithmeticExpression |
| 49 | - ) . ')'; |
|
| 49 | + ).')'; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $args[] = $sqlWalker->walkStringPrimary($expression); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return call_user_func_array(array($platform,'getConcatExpression'), $args); |
|
| 56 | + return call_user_func_array(array($platform, 'getConcatExpression'), $args); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function __construct(array $scalarExpressions) |
| 44 | 44 | { |
| 45 | - $this->scalarExpressions = $scalarExpressions; |
|
| 45 | + $this->scalarExpressions = $scalarExpressions; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | |
| 171 | 171 | // Recognize identifiers, aliased or qualified names |
| 172 | 172 | case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'): |
| 173 | - $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); |
|
| 173 | + $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value); |
|
| 174 | 174 | |
| 175 | 175 | if (defined($name)) { |
| 176 | 176 | $type = constant($name); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public static function syntaxError($message, $previous = null) |
| 51 | 51 | { |
| 52 | - return new self('[Syntax Error] ' . $message, 0, $previous); |
|
| 52 | + return new self('[Syntax Error] '.$message, 0, $previous); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public static function semanticalError($message, $previous = null) |
| 62 | 62 | { |
| 63 | - return new self('[Semantical Error] ' . $message, 0, $previous); |
|
| 63 | + return new self('[Semantical Error] '.$message, 0, $previous); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public static function invalidParameterType($expected, $received) |
| 81 | 81 | { |
| 82 | - return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.'); |
|
| 82 | + return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.'); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public static function invalidParameterPosition($pos) |
| 91 | 91 | { |
| 92 | - return new self('Invalid parameter position: ' . $pos); |
|
| 92 | + return new self('Invalid parameter position: '.$pos); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public static function tooManyParameters($expected, $received) |
| 102 | 102 | { |
| 103 | - return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received); |
|
| 103 | + return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public static function tooFewParameters($expected, $received) |
| 113 | 113 | { |
| 114 | - return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received); |
|
| 114 | + return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | public static function invalidPathExpression($pathExpr) |
| 151 | 151 | { |
| 152 | 152 | return new self( |
| 153 | - "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'." |
|
| 153 | + "Invalid PathExpression '".$pathExpr->identificationVariable.".".$pathExpr->field."'." |
|
| 154 | 154 | ); |
| 155 | 155 | } |
| 156 | 156 | |
@@ -183,8 +183,8 @@ discard block |
||
| 183 | 183 | public static function partialObjectsAreDangerous() |
| 184 | 184 | { |
| 185 | 185 | return new self( |
| 186 | - "Loading partial objects is dangerous. Fetch full objects or consider " . |
|
| 187 | - "using a different fetch mode. If you really want partial objects, " . |
|
| 186 | + "Loading partial objects is dangerous. Fetch full objects or consider ". |
|
| 187 | + "using a different fetch mode. If you really want partial objects, ". |
|
| 188 | 188 | "set the doctrine.forcePartialLoad query hint to TRUE." |
| 189 | 189 | ); |
| 190 | 190 | } |
@@ -222,8 +222,8 @@ discard block |
||
| 222 | 222 | public static function iterateWithFetchJoinNotAllowed($assoc) |
| 223 | 223 | { |
| 224 | 224 | return new self( |
| 225 | - "Iterate with fetch join in class " . $assoc['sourceEntity'] . |
|
| 226 | - " using association " . $assoc['fieldName'] . " not allowed." |
|
| 225 | + "Iterate with fetch join in class ".$assoc['sourceEntity']. |
|
| 226 | + " using association ".$assoc['fieldName']." not allowed." |
|
| 227 | 227 | ); |
| 228 | 228 | } |
| 229 | 229 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | public static function instanceOfUnrelatedClass($className, $rootClass) |
| 249 | 249 | { |
| 250 | - return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " . |
|
| 250 | + return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ". |
|
| 251 | 251 | "inheritance hierarchy does not exists between these two classes."); |
| 252 | 252 | } |
| 253 | 253 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | public static function invalidQueryComponent($dqlAlias) |
| 260 | 260 | { |
| 261 | 261 | return new self( |
| 262 | - "Invalid query component given for DQL alias '" . $dqlAlias . "', ". |
|
| 262 | + "Invalid query component given for DQL alias '".$dqlAlias."', ". |
|
| 263 | 263 | "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys." |
| 264 | 264 | ); |
| 265 | 265 | } |