From a584d19906945919ab9bf998ddc36064f4504f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Feb 2021 11:04:32 +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/Annotation.php | 1 - System/Di/Container.php | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index 07ce1fb7..d4e2b1f1 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -193,7 +193,6 @@ class Annotation extends Component * @param string $class * @return ReflectionClass|null * @throws ReflectionException - * @throws NotFindClassException */ private function reflectClass(string $class): ?ReflectionClass { diff --git a/System/Di/Container.php b/System/Di/Container.php index c610a0a3..25a893c1 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -161,12 +161,13 @@ class Container extends BaseObject return $object; } - /** - * @param $class - * - * @return array - * @throws ReflectionException - */ + /** + * @param $class + * @param array $constrict + * @return array|null + * @throws NotFindClassException + * @throws ReflectionException + */ private function resolveDependencies($class, $constrict = []): ?array { if (!isset($this->_reflection[$class])) { @@ -215,11 +216,12 @@ class Container extends BaseObject } - /** - * @param $class - * @return mixed - * @throws ReflectionException - */ + /** + * @param $class + * @return ReflectionClass|null + * @throws NotFindClassException + * @throws ReflectionException + */ public function getReflect($class): ?ReflectionClass { $reflect = $this->_reflection[$class] ?? null;