Parcourir la source

Rename alias used in Predis\Client for Predis\Transaction\MultiExec.

Daniele Alessandri il y a 10 ans
Parent
commit
5a474c5a32
2 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 4 4
      lib/Predis/Client.php
  2. 1 1
      tests/Predis/ClientTest.php

+ 4 - 4
lib/Predis/Client.php

@@ -27,7 +27,7 @@ use Predis\PubSub\Consumer as PubSubConsumer;
 use Predis\Response\ErrorInterface as ErrorResponseInterface;
 use Predis\Response\ResponseInterface;
 use Predis\Response\ServerException;
-use Predis\Transaction\MultiExec as TransactionMultiExec;
+use Predis\Transaction\MultiExec as MultiExecTransaction;
 
 /**
  * Client class used for connecting and executing commands on Redis.
@@ -430,7 +430,7 @@ class Client implements ClientInterface
      * of a transaction executed inside the optionally provided callable object.
      *
      * @param  mixed                      ... Array of options, a callable for execution, or both.
-     * @return TransactionMultiExec|array
+     * @return MultiExecTransaction|array
      */
     public function transaction(/* arguments */)
     {
@@ -442,11 +442,11 @@ class Client implements ClientInterface
      *
      * @param  array                      $options  Options for the context.
      * @param  mixed                      $callable Optional callable used to execute the context.
-     * @return TransactionMultiExec|array
+     * @return MultiExecTransaction|array
      */
     protected function createTransaction(array $options = null, $callable = null)
     {
-        $transaction = new TransactionMultiExec($this, $options);
+        $transaction = new MultiExecTransaction($this, $options);
 
         if (isset($callable)) {
             return $transaction->execute($callable);

+ 1 - 1
tests/Predis/ClientTest.php

@@ -736,7 +736,7 @@ class ClientTest extends PredisTestCase
      * @group disconnected
      * @todo I hate this test but reflection is the easiest way in this case.
      */
-    public function testTransactionWithArrayReturnsTransactionMultiExecWithOptions()
+    public function testTransactionWithArrayReturnsMultiExecTransactionWithOptions()
     {
         $options = array('cas' => true, 'retry' => 3);