-
-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
Description
class C {
function foo(MyArgInterface $x) {
}
}
Here it seems that phpDocumentor does not detect the "MyArgInterface" argument type.
nikic's php-parser does correctly detect the type, but then here in \phpDocumentor\Reflection\Php\Factory\Argument::create():
return new ArgumentDescriptor($object->name, $default, $object->byRef, $object->variadic);
This should be changed to
$argDescriptor = new ArgumentDescriptor($object->name, $default, $object->byRef, $object->variadic);
if (!empty($object->type)) {
$argDescriptor->addType((string)$object->type);
}
return $argDescriptor;
So it adds the type.
Not sure what other consequences this would have, so I am just proposing this for discussion.