mirror of
https://github.com/predis/predis.git
synced 2026-08-21 03:23:30 +00:00
Fix E_STRICT error messages.
This commit is contained in:
@@ -24,7 +24,7 @@ class PrefixHelpers
|
||||
* @param ICommand $command Command instance.
|
||||
* @param string $prefix Prefix string.
|
||||
*/
|
||||
public function first(ICommand $command, $prefix)
|
||||
public static function first(ICommand $command, $prefix)
|
||||
{
|
||||
if ($arguments = $command->getArguments()) {
|
||||
$arguments[0] = "$prefix{$arguments[0]}";
|
||||
|
||||
@@ -30,13 +30,15 @@ class ArrayHasSameValuesConstraint extends PHPUnit_Framework_Constraint
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function evaluate($other)
|
||||
public function evaluate($other, $description = '', $returnResult = FALSE)
|
||||
{
|
||||
$description = $description ?: 'Failed asserting that two arrays have the same elements.';
|
||||
|
||||
if (count($this->array) !== count($other)) {
|
||||
throw new PHPUnit_Framework_ExpectationFailedException('Failed asserting that two arrays have the same elements.');
|
||||
throw new PHPUnit_Framework_ExpectationFailedException($description);
|
||||
}
|
||||
if (array_diff($this->array, $other)) {
|
||||
throw new PHPUnit_Framework_ExpectationFailedException('Failed asserting that two arrays have the same elements.');
|
||||
throw new PHPUnit_Framework_ExpectationFailedException($description);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -79,7 +79,8 @@ class ServerSlowlogTest extends CommandTestCase
|
||||
{
|
||||
$redis = $this->getClient();
|
||||
|
||||
$threshold = array_pop($redis->config('get', 'slowlog-log-slower-than'));
|
||||
$config = $redis->config('get', 'slowlog-log-slower-than');
|
||||
$threshold = array_pop($config);
|
||||
|
||||
$redis->config('set', 'slowlog-log-slower-than', 0);
|
||||
$redis->set('foo', 'bar');
|
||||
|
||||
Reference in New Issue
Block a user