Pārlūkot izejas kodu

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

Daniele Alessandri 14 gadi atpakaļ
vecāks
revīzija
7d5cccaf7c
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      lib/Predis.php

+ 2 - 0
lib/Predis.php

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