From 357fd21a13e7468a86e5d10f67d8bba582a086ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 18:56:50 +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 --- System/Di/Container.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/System/Di/Container.php b/System/Di/Container.php index 8c18797e..cefcad03 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -195,9 +195,9 @@ class Container extends BaseObject return match ($param->getType()) { 'mixed' => $param->getDefaultValue(), 'string' => '', - 'int' => 0, + 'int', 'float' => 0, 'bool' => false, - 'NULL' => NULL, + '' => NULL, default => Snowflake::createObject($param->getType()) }; } @@ -234,6 +234,7 @@ class Container extends BaseObject * @param $class * @return ReflectionClass|null * @throws ReflectionException + * @throws NotFindClassException */ public function getReflect($class): ?ReflectionClass {