From eb42c8e0a261dc69da52d788dee160167a81bc57 Mon Sep 17 00:00:00 2001 From: whwyy Date: Fri, 3 Jul 2026 16:15:52 +0800 Subject: [PATCH] eee --- Client.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Client.php b/Client.php index 055dfee..3701615 100644 --- a/Client.php +++ b/Client.php @@ -52,15 +52,19 @@ class Client { // TODO: Implement __get() method. $getter = 'get' . ucfirst($name); - if (method_exists($this, $getter)) { + if (method_exists($this->abstracts, $getter)) { return $this->abstracts->$getter(); - } else if (method_exists($this, $name)) { - return $this->abstracts->$name(); - } else if (property_exists($this, $name)) { - return $this->abstracts->$name; - } else { - throw new Exception('Property|Method "' . $name . '" does not exist.'); } + + if (method_exists($this->abstracts, $name)) { + return $this->abstracts->$name(); + } + + if (property_exists($this->abstracts, $name)) { + return $this->abstracts->$name; + } + + throw new Exception('Property|Method "' . $name . '" does not exist.'); } }