|
21 | 21 | use function count; |
22 | 22 | use function current; |
23 | 23 | use function get_object_vars; |
24 | | -use function gettype; |
25 | 24 | use function implode; |
26 | 25 | use function is_array; |
27 | | -use function is_callable; |
28 | | -use function is_object; |
29 | 26 | use function is_string; |
30 | 27 | use function key; |
31 | 28 | use function rtrim; |
@@ -151,14 +148,6 @@ protected function processExpression( |
151 | 148 | : $platform->quoteValue((string) $argument->getValue()), |
152 | 149 | $argument instanceof Identifier => $platform->quoteIdentifierInFragment($argument->getValue()), |
153 | 150 | $argument instanceof Literal => $argument->getValue(), |
154 | | - $argument instanceof Values => $this->processValuesArgument( |
155 | | - $argument, |
156 | | - $expressionParamIndex, |
157 | | - $namedParameterPrefix, |
158 | | - $platform, |
159 | | - $driver, |
160 | | - $parameterContainer |
161 | | - ), |
162 | 151 | $argument instanceof Identifiers => $this->processIdentifiersArgument($argument, $platform), |
163 | 152 | $argument instanceof SelectArgument => $this->processExpressionOrSelect( |
164 | 153 | $argument, |
@@ -234,36 +223,6 @@ protected function processExpressionOrSelect( |
234 | 223 | }; |
235 | 224 | } |
236 | 225 |
|
237 | | - protected function processValuesArgument( |
238 | | - ArgumentInterface $argument, |
239 | | - int &$expressionParamIndex, |
240 | | - string $namedParameterPrefix, |
241 | | - PlatformInterface $platform, |
242 | | - ?DriverInterface $driver = null, |
243 | | - ?ParameterContainer $parameterContainer = null |
244 | | - ): string { |
245 | | - $values = $argument->getValue(); |
246 | | - $processedValues = []; |
247 | | - |
248 | | - if ($parameterContainer instanceof ParameterContainer) { |
249 | | - foreach ($values as $value) { |
250 | | - $processedValues[] = $this->processExpressionParameterName( |
251 | | - $value, |
252 | | - $namedParameterPrefix, |
253 | | - $expressionParamIndex, |
254 | | - $driver, |
255 | | - $parameterContainer |
256 | | - ); |
257 | | - } |
258 | | - } else { |
259 | | - foreach ($values as $value) { |
260 | | - $processedValues[] = $platform->quoteValue((string) $value); |
261 | | - } |
262 | | - } |
263 | | - |
264 | | - return implode(', ', $processedValues); |
265 | | - } |
266 | | - |
267 | 226 | protected function processIdentifiersArgument( |
268 | 227 | ArgumentInterface $argument, |
269 | 228 | PlatformInterface $platform |
@@ -419,13 +378,8 @@ protected function processJoin( |
419 | 378 | : '') . $platform->quoteIdentifier($joinName[0]); |
420 | 379 | } elseif ($joinName instanceof Select) { |
421 | 380 | $joinName = '(' . $this->processSubSelect($joinName, $platform, $driver, $parameterContainer) . ')'; |
422 | | - } elseif (is_string($joinName) || (is_object($joinName) && is_callable([$joinName, '__toString']))) { |
423 | | - $joinName = $platform->quoteIdentifier($joinName); |
424 | 381 | } else { |
425 | | - throw new Exception\InvalidArgumentException(sprintf( |
426 | | - 'Join name expected to be Expression|TableIdentifier|Select|string, "%s" given', |
427 | | - gettype($joinName) |
428 | | - )); |
| 382 | + $joinName = $platform->quoteIdentifier($joinName); |
429 | 383 | } |
430 | 384 |
|
431 | 385 | $joinSpecArgArray[$j] = [ |
@@ -511,9 +465,6 @@ protected function resolveTable( |
511 | 465 | return $table; |
512 | 466 | } |
513 | 467 |
|
514 | | - /** |
515 | | - * Copy variables from the subject into the local properties |
516 | | - */ |
517 | 468 | protected function localizeVariables(): void |
518 | 469 | { |
519 | 470 | if (! $this instanceof PlatformDecoratorInterface) { |
|
0 commit comments