From ee4436eab40deddfb19e7361f66b39a167d2f336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 4 Mar 2021 00:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Annotation/Loader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index a6e16069..f8686ebe 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -93,13 +93,13 @@ class Loader extends BaseObject * @param string $method * @return mixed */ - public function getMethod(string $class, string $method = ''): mixed + public function getMethod(string $class, string $method = ''): array { if (!isset($this->_classes[$class])) { - return null; + return []; } $properties = $this->_classes[$class]['methods']; - if (!empty($property) && isset($properties[$method])) { + if (!empty($method) && isset($properties[$method])) { return $properties[$method]; } return $properties;