Pārlūkot izejas kodu

Remove a useless method.

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

+ 1 - 10
lib/Predis.php

@@ -19,7 +19,7 @@ class Client {
 
     private function setupClient($options) {
         $this->_options = $this->filterClientOptions($options);
-        $this->setProfile($this->_options->profile);
+        $this->_profile = $this->_options->profile;
     }
 
     private function filterClientOptions($options) {
@@ -106,15 +106,6 @@ class Client {
         $this->_connection = $connection;
     }
 
-    private function setProfile($profile) {
-        if (!($profile instanceof ServerProfile || is_string($profile))) {
-            throw new \InvalidArgumentException(
-                "Invalid type for server profile, \Predis\Profiles\ServerProfile or string expected"
-            );
-        }
-        $this->_profile = is_string($profile) ? ServerProfile::get($profile) : $profile;
-    }
-
     public function getProfile() {
         return $this->_profile;
     }