Эх сурвалжийг харах

Overridden methods for UNWATCH and DISCARD in Predis\MultiExecBlock must return $this to not break method chaining.

Daniele Alessandri 14 жил өмнө
parent
commit
1e4661cfc8
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      lib/Predis.php

+ 2 - 0
lib/Predis.php

@@ -856,6 +856,7 @@ class MultiExecBlock {
     public function unwatch() {
         $this->isWatchSupported();
         $this->_redisClient->unwatch();
+        return $this;
     }
 
     public function discard() {
@@ -863,6 +864,7 @@ class MultiExecBlock {
         $this->_commands    = array();
         $this->_initialized = false;
         $this->_discarded   = true;
+        return $this;
     }
 
     public function exec() {