Quellcode durchsuchen

Clean up ugly code bits.

Daniele Alessandri vor 11 Jahren
Ursprung
Commit
cdb91284f1
1 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 7 2
      lib/Predis/Client.php

+ 7 - 2
lib/Predis/Client.php

@@ -366,8 +366,13 @@ class Client implements ClientInterface
      */
      */
     protected function createTransaction(Array $options = null, $callable = null)
     protected function createTransaction(Array $options = null, $callable = null)
     {
     {
-        $transaction = new MultiExecContext($this, $options ?: array());
-        return isset($callable) ? $transaction->execute($callable) : $transaction;
+        $transaction = new MultiExecContext($this, $options);
+
+        if (isset($callable)) {
+            return $transaction->execute($callable);
+        }
+
+        return $transaction;
     }
     }
 
 
     /**
     /**