Sfoglia il codice sorgente

Trim some more "use" directives in Predis\Client.

Daniele Alessandri 11 anni fa
parent
commit
0779c1c24a
1 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 9 9
      lib/Predis/Client.php

+ 9 - 9
lib/Predis/Client.php

@@ -13,9 +13,7 @@ namespace Predis;
 
 use InvalidArgumentException;
 use UnexpectedValueException;
-use Predis\Command\CommandInterface;
-use Predis\Command\RawCommand;
-use Predis\Command\ScriptCommand;
+use Predis\Command;
 use Predis\Configuration;
 use Predis\Connection;
 use Predis\Monitor;
@@ -265,7 +263,7 @@ class Client implements ClientInterface
     {
         $error = false;
 
-        $command = new RawCommand($arguments);
+        $command = new Command\RawCommand($arguments);
         $response = $this->connection->executeCommand($command);
 
         if ($response instanceof Response\ResponseInterface) {
@@ -306,7 +304,7 @@ class Client implements ClientInterface
     /**
      * {@inheritdoc}
      */
-    public function executeCommand(CommandInterface $command)
+    public function executeCommand(Command\CommandInterface $command)
     {
         $response = $this->connection->executeCommand($command);
 
@@ -324,13 +322,15 @@ class Client implements ClientInterface
     /**
      * Handles -ERR responses returned by Redis.
      *
-     * @param CommandInterface $command Redis command that generated the error.
+     * @param Command\CommandInterface $command Redis command that generated the error.
      * @param Response\ErrorInterface $response Instance of the error response.
      * @return mixed
      */
-    protected function onResponseError(CommandInterface $command, Response\ErrorInterface $response)
-    {
-        if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
+    protected function onResponseError(
+        Command\CommandInterface $command,
+        Response\ErrorInterface $response
+    ) {
+        if ($command instanceof Command\ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
             $eval = $this->createCommand('eval');
             $eval->setRawArguments($command->getEvalArguments());