Skip to content

Commit

Permalink
Handle typehint value 'self'
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Rademacher committed Jul 3, 2020
1 parent 89b5f8d commit 836cd07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DocBlock/StandardTagFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ private function getArgumentsForParametersFromWiring(array $parameters, array $l
$typeHint = null;
if ($type instanceof \ReflectionNamedType) {
$typeHint = $type->getName();
if ($typeHint === 'self') {
$typeHint = $parameter->getDeclaringClass()->getName();
}
}

if (isset($locator[$typeHint])) {
Expand Down

0 comments on commit 836cd07

Please sign in to comment.