Skip to content

Commit 5f9b9dd

Browse files
committed
Replace with $phpDocNode->getPureUnlessCallableIsImpureTagValues()
1 parent 210e23d commit 5f9b9dd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/PhpDoc/PhpDocNodeResolver.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,8 @@ public function resolveParamImmediatelyInvokedCallable(PhpDocNode $phpDocNode):
423423
public function resolveParamPureUnlessCallableIsImpure(PhpDocNode $phpDocNode): array
424424
{
425425
$parameters = [];
426-
// TODO: implement phpstan/phpdoc-parser
427-
foreach ($phpDocNode->getTagsByName('@pure-unless-callable-impure') as $tag) {
428-
$value = preg_split('/\s/u', (string)$tag->value)[0] ?? null;
429-
if ($value !== null && str_starts_with($value, '$')) {
430-
$parameters[substr($value, 1)] = true;
431-
}
426+
foreach ($phpDocNode->getPureUnlessCallableIsImpureTagValues() as $tag) {
427+
$parameters[$tag->parameterName] = true;
432428
}
433429

434430
return $parameters;

0 commit comments

Comments
 (0)