diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 0ff7b4af934..52543b17881 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -37,9 +37,7 @@ 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; @@ -3472,13 +3470,9 @@ public function getTruncateTableSQL($tableName, $cascade = false) /** * 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); } diff --git a/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/lib/Doctrine/DBAL/Platforms/DB2Platform.php index 886a64112e5..d5cade6e8af 100644 --- a/lib/Doctrine/DBAL/Platforms/DB2Platform.php +++ b/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -12,8 +12,6 @@ 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; @@ -872,10 +870,8 @@ public function getForUpdateSQL() /** * {@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); } diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index 1614ed203ba..f5ef8d59df7 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -15,8 +15,6 @@ 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; @@ -1106,10 +1104,8 @@ public function getTruncateTableSQL($tableName, $cascade = false) /** * {@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); }