diff --git a/Annotation/Inject.php b/Annotation/Inject.php index fecdb903..7ebd64d2 100644 --- a/Annotation/Inject.php +++ b/Annotation/Inject.php @@ -81,13 +81,12 @@ use Snowflake\Snowflake; private function parseInjectValue(): mixed { if (class_exists($this->className)) { - $injectValue = Snowflake::getDi()->get($this->className, $this->args); + return Snowflake::getDi()->get($this->className, $this->args); } else if (Snowflake::app()->has($this->className)) { - $injectValue = Snowflake::app()->get($this->className); + return Snowflake::app()->get($this->className); } else { - $injectValue = $this->className; + return $this->className; } - return $injectValue; } }