Got rid of func_num_args in AbstractPlatform::getDummySelectSQL()

parent 83acc2ac
......@@ -37,9 +37,7 @@ use function array_values;
use function assert;
use function count;
use function explode;
use function func_get_arg;
use function func_get_args;
use function func_num_args;
use function implode;
use function in_array;
use function is_array;
......@@ -3487,13 +3485,9 @@ abstract class AbstractPlatform
/**
* This is for test reasons, many vendors have special requirements for dummy statements.
*
* @return string
*/
public function getDummySelectSQL()
public function getDummySelectSQL(string $expression = '1') : string
{
$expression = func_num_args() > 0 ? func_get_arg(0) : '1';
return sprintf('SELECT %s', $expression);
}
......
......@@ -13,8 +13,6 @@ use function array_merge;
use function count;
use function current;
use function explode;
use function func_get_arg;
use function func_num_args;
use function implode;
use function sprintf;
use function strpos;
......@@ -874,10 +872,8 @@ class DB2Platform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDummySelectSQL()
public function getDummySelectSQL(string $expression = '1') : string
{
$expression = func_num_args() > 0 ? func_get_arg(0) : '1';
return sprintf('SELECT %s FROM sysibm.sysdummy1', $expression);
}
......
......@@ -15,8 +15,6 @@ use InvalidArgumentException;
use function array_merge;
use function count;
use function explode;
use function func_get_arg;
use function func_num_args;
use function implode;
use function preg_match;
use function sprintf;
......@@ -1110,10 +1108,8 @@ SQL
/**
* {@inheritDoc}
*/
public function getDummySelectSQL()
public function getDummySelectSQL(string $expression = '1') : string
{
$expression = func_num_args() > 0 ? func_get_arg(0) : '1';
return sprintf('SELECT %s FROM DUAL', $expression);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment