Skip to content

Commit

Permalink
Remove method Client::echo() since "echo" is a reserved word
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Mar 16, 2019
1 parent 44af7dd commit 9ebf39d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
8 changes: 0 additions & 8 deletions Client/Phpredis/Client2_2_8.php
Original file line number Diff line number Diff line change
Expand Up @@ -1203,14 +1203,6 @@ public function role()
return $this->call('role');
}

/**
* {@inheritdoc}
*/
public function eval()
{
return $this->call('eval');
}

/**
* {@inheritdoc}
*/
Expand Down
8 changes: 8 additions & 0 deletions Client/Phpredis/Client3_1_6.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ public function ping()
return $this->call('ping');
}

/**
* {@inheritdoc}
*/
public function echo()
{
return $this->call('echo');
}

/**
* {@inheritdoc}
*/
Expand Down
8 changes: 8 additions & 0 deletions Client/Phpredis/Client4_2_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,14 @@ public function ping()
return $this->call('ping');
}

/**
* {@inheritdoc}
*/
public function echo()
{
return $this->call('echo');
}

/**
* {@inheritdoc}
*/
Expand Down
3 changes: 2 additions & 1 deletion clientbuilder/build_redis_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ private function flatten($arguments, array &$list)

/* @var $reflectedMethod \ReflectionMethod */
foreach ($reflectedMethods as $reflectedMethod) {
if ($reflectedMethod->isFinal() || $reflectedMethod->isConstructor() || in_array($reflectedMethod->getName(), ['echo'], true)) {
if ($reflectedMethod->isFinal() || $reflectedMethod->isConstructor() || PHP_VERSION_ID < 70000 && in_array($reflectedMethod->getName(), ['echo', 'eval'], true)) {
continue;
}

$method = "\n /**\n";
$method .= " * {@inheritdoc}\n";
$method .= " */\n";
Expand Down

0 comments on commit 9ebf39d

Please sign in to comment.