@@ -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 | } |
@@ -162,7 +162,7 @@ |
||
162 | 162 | |
163 | 163 | // Recognize identifiers, aliased or qualified names |
164 | 164 | case \ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\': |
165 | - $name = 'Doctrine\ORM\Query\Lexer::T_' . \strtoupper($value); |
|
165 | + $name = 'Doctrine\ORM\Query\Lexer::T_'.\strtoupper($value); |
|
166 | 166 | |
167 | 167 | if (\defined($name)) { |
168 | 168 | $type = \constant($name); |
@@ -41,12 +41,12 @@ |
||
41 | 41 | $queryPart = (string) $part; |
42 | 42 | |
43 | 43 | if (\is_object($part) && $part instanceof self && $part->count() > 1) { |
44 | - return $this->preSeparator . $queryPart . $this->postSeparator; |
|
44 | + return $this->preSeparator.$queryPart.$this->postSeparator; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND") |
48 | 48 | if (\stripos($queryPart, ' OR ') !== false || \stripos($queryPart, ' AND ') !== false) { |
49 | - return $this->preSeparator . $queryPart . $this->postSeparator; |
|
49 | + return $this->preSeparator.$queryPart.$this->postSeparator; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | return $queryPart; |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function add($arg) |
65 | 65 | { |
66 | - if ($arg !== null && (! $arg instanceof self || $arg->count() > 0)) { |
|
66 | + if ($arg !== null && ( ! $arg instanceof self || $arg->count() > 0)) { |
|
67 | 67 | // If we decide to keep Expr\Base instances, we can use this check |
68 | - if (! \is_string($arg)) { |
|
68 | + if ( ! \is_string($arg)) { |
|
69 | 69 | $class = \get_class($arg); |
70 | 70 | |
71 | - if (! \in_array($class, $this->allowedClasses, true)) { |
|
71 | + if ( ! \in_array($class, $this->allowedClasses, true)) { |
|
72 | 72 | throw new InvalidArgumentException( |
73 | 73 | \sprintf("Expression of type '%s' not allowed in this context.", $class) |
74 | 74 | ); |
@@ -98,6 +98,6 @@ discard block |
||
98 | 98 | return (string) $this->parts[0]; |
99 | 99 | } |
100 | 100 | |
101 | - return $this->preSeparator . \implode($this->separator, $this->parts) . $this->postSeparator; |
|
101 | + return $this->preSeparator.\implode($this->separator, $this->parts).$this->postSeparator; |
|
102 | 102 | } |
103 | 103 | } |
@@ -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 | } |
@@ -107,8 +107,8 @@ |
||
107 | 107 | public function __toString() |
108 | 108 | { |
109 | 109 | return \strtoupper($this->joinType) . ' JOIN ' . $this->join |
110 | - . ($this->alias ? ' ' . $this->alias : '') |
|
111 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
112 | - . ($this->condition ? ' ' . \strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
110 | + . ($this->alias ? ' ' . $this->alias : '') |
|
111 | + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
112 | + . ($this->condition ? ' ' . \strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
113 | 113 | } |
114 | 114 | } |
@@ -106,9 +106,9 @@ |
||
106 | 106 | */ |
107 | 107 | public function __toString() |
108 | 108 | { |
109 | - return \strtoupper($this->joinType) . ' JOIN ' . $this->join |
|
110 | - . ($this->alias ? ' ' . $this->alias : '') |
|
111 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
112 | - . ($this->condition ? ' ' . \strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
109 | + return \strtoupper($this->joinType).' JOIN '.$this->join |
|
110 | + . ($this->alias ? ' '.$this->alias : '') |
|
111 | + . ($this->indexBy ? ' INDEX BY '.$this->indexBy : '') |
|
112 | + . ($this->condition ? ' '.\strtoupper($this->conditionType).' '.$this->condition : ''); |
|
113 | 113 | } |
114 | 114 | } |
@@ -50,6 +50,6 @@ |
||
50 | 50 | */ |
51 | 51 | public function __toString() |
52 | 52 | { |
53 | - return $this->name . '(' . \implode(', ', $this->arguments) . ')'; |
|
53 | + return $this->name.'('.\implode(', ', $this->arguments).')'; |
|
54 | 54 | } |
55 | 55 | } |
@@ -252,8 +252,8 @@ discard block |
||
252 | 252 | */ |
253 | 253 | private function resolveMagicCall($method, $by, array $arguments) |
254 | 254 | { |
255 | - if (! $arguments) { |
|
256 | - throw InvalidMagicMethodCall::onMissingParameter($method . $by); |
|
255 | + if ( ! $arguments) { |
|
256 | + throw InvalidMagicMethodCall::onMissingParameter($method.$by); |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | $fieldName = \lcfirst(Inflector::classify($by)); |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | throw InvalidMagicMethodCall::becauseFieldNotFoundIn( |
263 | 263 | $this->entityName, |
264 | 264 | $fieldName, |
265 | - $method . $by |
|
265 | + $method.$by |
|
266 | 266 | ); |
267 | 267 | } |
268 | 268 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $discrColumnName = $metaMappingDiscrColumnName; |
86 | 86 | } |
87 | 87 | |
88 | - if (! isset($sqlResult[$discrColumnName])) { |
|
88 | + if ( ! isset($sqlResult[$discrColumnName])) { |
|
89 | 89 | throw HydrationException::missingDiscriminatorColumn($entityName, $discrColumnName, \key($this->rsm->aliasMap)); |
90 | 90 | } |
91 | 91 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $discrMap = $this->class->discriminatorMap; |
97 | 97 | |
98 | - if (! isset($discrMap[$sqlResult[$discrColumnName]])) { |
|
98 | + if ( ! isset($discrMap[$sqlResult[$discrColumnName]])) { |
|
99 | 99 | throw HydrationException::invalidDiscriminatorValue($sqlResult[$discrColumnName], \array_keys($discrMap)); |
100 | 100 | } |
101 | 101 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | $cacheKeyInfo = $this->hydrateColumnInfo($column); |
114 | 114 | |
115 | - if (! $cacheKeyInfo) { |
|
115 | + if ( ! $cacheKeyInfo) { |
|
116 | 116 | continue; |
117 | 117 | } |
118 | 118 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $fieldName = $cacheKeyInfo['fieldName']; |
129 | 129 | |
130 | 130 | // Prevent overwrite in case of inherit classes using same property name (See AbstractHydrator) |
131 | - if (! isset($data[$fieldName]) || ! $valueIsNull) { |
|
131 | + if ( ! isset($data[$fieldName]) || ! $valueIsNull) { |
|
132 | 132 | $data[$fieldName] = $value; |
133 | 133 | } |
134 | 134 | } |