diff --git a/src/Traits/GetDependenciesTrait.php b/src/Traits/GetDependenciesTrait.php index f0d053a..c0e8715 100644 --- a/src/Traits/GetDependenciesTrait.php +++ b/src/Traits/GetDependenciesTrait.php @@ -26,7 +26,7 @@ protected function transformDependency(ReflectionParameter $parameter) return null; } - return interface_exists($class->getName()) ? $this->getClassByInterface($class->getName()) : $class->getName(); + return interface_exists($type->getName()) ? $this->getClassByInterface($type->getName()) : $type->getName(); } protected function getClassByInterface($interfaceName)