Skip to content

Commit 836cd07

Browse files
author
Martin Rademacher
committed
Handle typehint value 'self'
1 parent 89b5f8d commit 836cd07

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/DocBlock/StandardTagFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ private function getArgumentsForParametersFromWiring(array $parameters, array $l
258258
$typeHint = null;
259259
if ($type instanceof \ReflectionNamedType) {
260260
$typeHint = $type->getName();
261+
if ($typeHint === 'self') {
262+
$typeHint = $parameter->getDeclaringClass()->getName();
263+
}
261264
}
262265

263266
if (isset($locator[$typeHint])) {

0 commit comments

Comments
 (0)