Prefer func_get_arg over func_get_args

parent de2bfb12
......@@ -20,7 +20,7 @@
namespace Doctrine\DBAL\Query\Expression;
use Doctrine\DBAL\Connection;
use function func_get_args;
use function func_get_arg;
use function func_num_args;
use function sprintf;
......@@ -260,7 +260,7 @@ class ExpressionBuilder
public function like($x, $y)
{
return $this->comparison($x, 'LIKE', $y) .
(func_num_args() >= 3 ? sprintf(" ESCAPE '%s'", func_get_args()[2]) : '');
(func_num_args() >= 3 ? sprintf(" ESCAPE '%s'", func_get_arg(2)) : '');
}
/**
......@@ -274,7 +274,7 @@ class ExpressionBuilder
public function notLike($x, $y)
{
return $this->comparison($x, 'NOT LIKE', $y) .
(func_num_args() >= 3 ? sprintf(" ESCAPE '%s'", func_get_args()[2]) : '');
(func_num_args() >= 3 ? sprintf(" ESCAPE '%s'", func_get_arg(2)) : '');
}
/**
......
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