This commit is contained in:
2021-03-03 23:47:19 +08:00
parent fc5cf3981d
commit c588806baf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class Annotation extends Component
* @return array 根据类名获取注解
* 根据类名获取注解
*/
public function getMethods(string $className, string $method = ''): array
public function getMethods(string $className, string $method = ''): mixed
{
return $this->_loader->getMethod($className, $method);
}
+1 -1
View File
@@ -96,7 +96,7 @@ class Loader extends BaseObject
public function getMethod(string $class, string $method = ''): mixed
{
if (!isset($this->_classes[$class])) {
return [];
return null;
}
$properties = $this->_classes[$class]['methods'];
if (!empty($property) && isset($properties[$method])) {