Переглянути джерело

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

Daniele Alessandri 14 роки тому
батько
коміт
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() {