mirror of
https://github.com/predis/predis.git
synced 2026-09-14 20:37:29 +00:00
Add getArgument($index) in Predis\Command\CommandInterface.
This method should have been part of the interface since start since it is used through the library. We also do not specify a default value for the index argument since it does not make much sense.
This commit is contained in:
@@ -65,7 +65,7 @@ abstract class AbstractCommand implements CommandInterface
|
||||
*
|
||||
* @param array $arguments Position of the argument.
|
||||
*/
|
||||
public function getArgument($index = 0)
|
||||
public function getArgument($index)
|
||||
{
|
||||
if (isset($this->arguments[$index])) {
|
||||
return $this->arguments[$index];
|
||||
|
||||
@@ -59,6 +59,13 @@ interface CommandInterface
|
||||
*/
|
||||
public function getArguments();
|
||||
|
||||
/**
|
||||
* Gets the argument of the command at the specified index.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getArgument($index);
|
||||
|
||||
/**
|
||||
* Parses a reply buffer and returns a PHP object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user