This commit is contained in:
2021-02-22 18:56:50 +08:00
parent bb94229dc3
commit 357fd21a13
+3 -2
View File
@@ -195,9 +195,9 @@ class Container extends BaseObject
return match ($param->getType()) { return match ($param->getType()) {
'mixed' => $param->getDefaultValue(), 'mixed' => $param->getDefaultValue(),
'string' => '', 'string' => '',
'int' => 0, 'int', 'float' => 0,
'bool' => false, 'bool' => false,
'NULL' => NULL, '' => NULL,
default => Snowflake::createObject($param->getType()) default => Snowflake::createObject($param->getType())
}; };
} }
@@ -234,6 +234,7 @@ class Container extends BaseObject
* @param $class * @param $class
* @return ReflectionClass|null * @return ReflectionClass|null
* @throws ReflectionException * @throws ReflectionException
* @throws NotFindClassException
*/ */
public function getReflect($class): ?ReflectionClass public function getReflect($class): ?ReflectionClass
{ {