From a67d35b799da0a953b18e1fc8a02037375f0b788 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Wed, 23 Jul 2014 15:30:18 +0200 Subject: [PATCH] Remove useless interface Predis\BasicClientInterface. --- src/BasicClientInterface.php | 31 ------------------------------- src/ClientInterface.php | 14 +++++++++++--- src/Pipeline/Pipeline.php | 3 +-- src/Transaction/MultiExec.php | 3 +-- 4 files changed, 13 insertions(+), 38 deletions(-) delete mode 100644 src/BasicClientInterface.php diff --git a/src/BasicClientInterface.php b/src/BasicClientInterface.php deleted file mode 100644 index 307d6d00..00000000 --- a/src/BasicClientInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Predis; - -use Predis\Command\CommandInterface; - -/** - * Defines the interface of a basic client class or abstraction that can send - * commands to Redis. - * - * @author Daniele Alessandri - */ -interface BasicClientInterface -{ - /** - * Executes the specified Redis command. - * - * @param CommandInterface $command Command instance. - * @return mixed - */ - public function executeCommand(CommandInterface $command); -} diff --git a/src/ClientInterface.php b/src/ClientInterface.php index 7301a0cf..b5ad3056 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -17,12 +17,12 @@ use Predis\Connection\ConnectionInterface; use Predis\Profile\ProfileInterface; /** - * Interface defining the most important methods needed to create an high-level - * Redis client that can interact with other building blocks of Predis. + * Interface defining an high-level Redis client that can interact with other + * building blocks of Predis. * * @author Daniele Alessandri */ -interface ClientInterface extends BasicClientInterface +interface ClientInterface { /** * Returns the server profile used by the client. @@ -64,6 +64,14 @@ interface ClientInterface extends BasicClientInterface */ public function createCommand($method, $arguments = array()); + /** + * Executes the specified Redis command. + * + * @param CommandInterface $command Command instance. + * @return mixed + */ + public function executeCommand(CommandInterface $command); + /** * Creates a Redis command with the specified arguments and sends a request * to the server. diff --git a/src/Pipeline/Pipeline.php b/src/Pipeline/Pipeline.php index d6a47df1..d07951a8 100644 --- a/src/Pipeline/Pipeline.php +++ b/src/Pipeline/Pipeline.php @@ -14,7 +14,6 @@ namespace Predis\Pipeline; use Exception; use InvalidArgumentException; use SplQueue; -use Predis\BasicClientInterface; use Predis\ClientException; use Predis\ClientInterface; use Predis\ExecutableContextInterface; @@ -31,7 +30,7 @@ use Predis\Response\ServerException; * * @author Daniele Alessandri */ -class Pipeline implements BasicClientInterface, ExecutableContextInterface +class Pipeline implements ExecutableContextInterface { private $client; private $pipeline; diff --git a/src/Transaction/MultiExec.php b/src/Transaction/MultiExec.php index 63ba4aa7..b22f51ca 100644 --- a/src/Transaction/MultiExec.php +++ b/src/Transaction/MultiExec.php @@ -14,7 +14,6 @@ namespace Predis\Transaction; use Exception; use InvalidArgumentException; use SplQueue; -use Predis\BasicClientInterface; use Predis\ClientException; use Predis\ClientInterface; use Predis\CommunicationException; @@ -32,7 +31,7 @@ use Predis\Protocol\ProtocolException; * * @author Daniele Alessandri */ -class MultiExec implements BasicClientInterface, ExecutableContextInterface +class MultiExec implements ExecutableContextInterface { private $state;