diff --git a/System/Snowflake.php b/System/Snowflake.php index 515eb30f..db5964b2 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -90,6 +90,9 @@ class Snowflake */ public static function createObject($className, $construct = []): mixed { + if (is_object($className)) { + return $className; + } if (is_string($className)) { return static::$container->get($className, $construct); } else if (is_array($className)) { @@ -273,7 +276,6 @@ class Snowflake } - /** * @param string $class * @param array $params