catch (\ReflectionException
) { return null;
} $reflectionConstructor =
$reflectionClass->
getConstructor();
if (!
$reflectionConstructor) { return null;
} try { $docBlock =
$this->docBlockFactory->
create($reflectionConstructor,
$this->contextFactory->
createFromReflector($reflectionConstructor));
return $this->
filterDocBlockParams($docBlock,
$property);
} catch (\InvalidArgumentException
) { return null;
} } private function filterDocBlockParams(DocBlock
$docBlock, string
$allowedParam): DocBlock
{ $tags =
array_values(array_filter($docBlock->
getTagsByName('param'
),
fn ($tag) =>
$tag instanceof DocBlock\Tags\Param &&
$allowedParam ===
$tag->
getVariableName()));
return new DocBlock($docBlock->
getSummary(),
$docBlock->
getDescription(),
$tags,
$docBlock->
getContext(),
$docBlock->
getLocation(),
$docBlock->
isTemplateStart(),
$docBlock->
isTemplateEnd());
}