瀏覽代碼

Reduce lines of code.

Daniele Alessandri 14 年之前
父節點
當前提交
f1488534b6
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      lib/Predis.php

+ 1 - 5
lib/Predis.php

@@ -119,11 +119,7 @@ class Client {
                 "Invalid connection alias: '$connectionAlias'"
             );
         }
-
-        $newClient = new Client();
-        $newClient->setupClient($this->_options);
-        $newClient->setConnection($connection);
-        return $newClient;
+        return new Client($connection, $this->_options);
     }
 
     public function connect() {