diff --git a/src/Decorators/KeepMethodDecorator.php b/src/Decorators/KeepMethodDecorator.php index a3584b77a24ebce009820aefd5a753247c410b3b..a27d1e2117d8b9622c563a143301e3d2874178e6 100644 --- a/src/Decorators/KeepMethodDecorator.php +++ b/src/Decorators/KeepMethodDecorator.php @@ -79,7 +79,7 @@ final class KeepMethodDecorator implements ClassDecorator */ foreach ($method->getParameters() as $parameter) { $type = $parameter->getType(); - if ($type !== null && \class_exists($type)) { + if ($type !== null && (\class_exists($type) || \interface_exists($type))) { $namespace->addUse($type); } }