From ac89992176d56962d185fd230b7ce08ea530ee8b Mon Sep 17 00:00:00 2001 From: 7r1n17y <7r1n17y7@gmail.com> Date: Sat, 8 Jul 2017 22:37:02 -0500 Subject: [PATCH] Cleaned code. --- src/Extender.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Extender.php b/src/Extender.php index caebcc0..3ef23bb 100644 --- a/src/Extender.php +++ b/src/Extender.php @@ -18,12 +18,10 @@ public function __get($var_name) { public function __call($method, $args) { foreach($this->_exts as $ext) { if (method_exists($ext, $method)) { - return call_user_method_array($method,$ext,$args); + return call_user_method_array($method,$ext,$args); } - } - throw new Exception("This Method {$method} doesn't exists"); } - - + throw new \RuntimeException(sprintf('This method "%s" doesn\'t exists', $method); + } } ?>