From 33b71a085cb8defb0dd3091ede166db3bd11b9c3 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Sat, 8 Jan 2011 01:57:47 +0100 Subject: [PATCH] Remove a useless method. --- lib/Predis.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/Predis.php b/lib/Predis.php index 3fbc1a07..04186695 100644 --- a/lib/Predis.php +++ b/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; }