浏览代码

Replace remaining occurrences of "reply" with "response".

Daniele Alessandri 11 年之前
父节点
当前提交
14fda643f7

+ 2 - 2
lib/Predis/Command/CommandInterface.php

@@ -68,9 +68,9 @@ interface CommandInterface
     public function getArgument($index);
 
     /**
-     * Parses a reply buffer and returns a PHP object.
+     * Parses a raw response and returns a PHP object.
      *
-     * @param string $data Binary string containing the whole reply.
+     * @param string $data Binary string containing the whole response.
      * @return mixed
      */
     public function parseResponse($data);

+ 2 - 3
lib/Predis/Command/ServerClient.php

@@ -47,10 +47,9 @@ class ServerClient extends Command
     }
 
     /**
-     * Parses the reply buffer and returns the list of clients returned by
-     * the CLIENT LIST command.
+     * Parses the response to CLIENT LIST and returns a structured list.
      *
-     * @param string $data Reply buffer
+     * @param string $data Response buffer.
      * @return array
      */
     protected function parseClientList($data)

+ 2 - 2
lib/Predis/Command/ServerInfo.php

@@ -56,7 +56,7 @@ class ServerInfo extends Command
     }
 
     /**
-     * Parses the reply buffer and extracts the statistics of each logical DB.
+     * Extracts the statistics of each logical DB from the string buffer.
      *
      * @param string $str Reply buffer.
      * @return array
@@ -74,7 +74,7 @@ class ServerInfo extends Command
     }
 
     /**
-     * Parses the reply buffer and extracts the allocation statistics.
+     * Parses the response and extracts the allocation statistics.
      *
      * @param string $str Reply buffer.
      * @return array

+ 3 - 3
lib/Predis/Connection/ConnectionInterface.php

@@ -39,14 +39,14 @@ interface ConnectionInterface
     public function isConnected();
 
     /**
-     * Write a Redis command on the connection.
+     * Writes the given command over the connection.
      *
      * @param CommandInterface $command Instance of a Redis command.
      */
     public function writeRequest(CommandInterface $command);
 
     /**
-     * Reads the reply for a Redis command from the connection.
+     * Reads the response to a command from the connection.
      *
      * @param CommandInterface $command Instance of a Redis command.
      * @return mixed
@@ -54,7 +54,7 @@ interface ConnectionInterface
     public function readResponse(CommandInterface $command);
 
     /**
-     * Writes a Redis command to the connection and reads back the reply.
+     * Writes a command over the connection and reads back the response.
      *
      * @param CommandInterface $command Instance of a Redis command.
      * @return mixed

+ 1 - 1
lib/Predis/Connection/SingleConnectionInterface.php

@@ -50,7 +50,7 @@ interface SingleConnectionInterface extends ConnectionInterface
     public function pushInitCommand(CommandInterface $command);
 
     /**
-     * Reads a reply from the server.
+     * Reads a response from the server.
      *
      * @return mixed
      */

+ 1 - 1
lib/Predis/Connection/WebdisConnection.php

@@ -172,7 +172,7 @@ class WebdisConnection implements SingleConnectionInterface
      * Feeds phpredis' reader resource with the data read from the network.
      *
      * @param resource $resource Reader resource.
-     * @param string $buffer Buffer with the reply read from the network.
+     * @param string $buffer Data read from the network.
      * @return int
      */
     protected function feedReader($resource, $buffer)

+ 1 - 1
lib/Predis/Replication/ReplicationStrategy.php

@@ -15,7 +15,7 @@ use Predis\NotSupportedException;
 use Predis\Command\CommandInterface;
 
 /**
- * Defines a strategy for master/reply replication.
+ * Defines a strategy for master/slave replication.
  *
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */

+ 3 - 4
lib/Predis/Response/Iterator/MultiBulk.php

@@ -24,7 +24,7 @@ class MultiBulk extends MultiBulkIterator
 
     /**
      * @param SingleConnectionInterface $connection Connection to Redis.
-     * @param int $size Number of elements of the multibulk reply.
+     * @param int $size Number of elements of the multibulk response.
      */
     public function __construct(SingleConnectionInterface $connection, $size)
     {
@@ -66,7 +66,7 @@ class MultiBulk extends MultiBulkIterator
     }
 
     /**
-     * Reads the next item of the multibulk reply from the server.
+     * Reads the next item of the multibulk response from the connection.
      *
      * @return mixed
      */
@@ -76,8 +76,7 @@ class MultiBulk extends MultiBulkIterator
     }
 
     /**
-     * Returns an iterator that reads the multi-bulk response as
-     * list of tuples.
+     * Returns an iterator that reads a multi-bulk response as a list of tuples.
      *
      * @return MultiBulkTuple
      */

+ 2 - 2
tests/Predis/Pipeline/PipelineTest.php

@@ -478,8 +478,8 @@ class PipelineTest extends PredisTestCase
     }
 
     /**
-     * Helper method that returns a callback used to emulate a reply
-     * to an ECHO command.
+     * Helper method that returns a callback used to emulate the response to an
+     * ECHO command.
      *
      * @return \Closure
      */

+ 1 - 1
tests/Predis/Response/Iterator/MultiBulkTest.php

@@ -65,7 +65,7 @@ class MultiBulkTest extends PredisTestCase
     /**
      * @group connected
      */
-    public function testDropWithFalseConsumesReplyFromUnderlyingConnection()
+    public function testDropWithFalseConsumesResponseFromUnderlyingConnection()
     {
         $client = $this->getClient();
         $client->rpush('metavars', 'foo', 'hoge', 'lol');

+ 5 - 5
tests/Predis/Transaction/MultiExecTest.php

@@ -281,8 +281,8 @@ class MultiExecTest extends PredisTestCase
         $tx = $this->getMockedTransaction($callback, $options);
 
         $tx->watch('foobar');
-        $this->assertSame('DUMMY_REPLY', $tx->get('foo'));
-        $this->assertSame('DUMMY_REPLY', $tx->get('hoge'));
+        $this->assertSame('DUMMY_RESPONSE', $tx->get('foo'));
+        $this->assertSame('DUMMY_RESPONSE', $tx->get('hoge'));
 
         $replies = $tx->multi()
                       ->get('foo')
@@ -313,8 +313,8 @@ class MultiExecTest extends PredisTestCase
             $reply1 = $tx->get('foo');
             $reply2 = $tx->get('hoge');
 
-            $test->assertSame('DUMMY_REPLY', $reply1);
-            $test->assertSame('DUMMY_REPLY', $reply2);
+            $test->assertSame('DUMMY_RESPONSE', $reply1);
+            $test->assertSame('DUMMY_RESPONSE', $reply2);
 
             $tx->multi();
 
@@ -835,7 +835,7 @@ class MultiExecTest extends PredisTestCase
                     $watch = false;
 
                 default:
-                    return $multi ? new Response\Status('QUEUED') : 'DUMMY_REPLY';
+                    return $multi ? new Response\Status('QUEUED') : 'DUMMY_RESPONSE';
             }
         };
     }