Skip to content

Commit 5308865

Browse files
committed
Replace with $phpDocNode->getPureUnlessCallableIsImpureTagValues()
1 parent 76c43b4 commit 5308865

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
@@ -426,12 +426,8 @@ public function resolveParamImmediatelyInvokedCallable(PhpDocNode $phpDocNode):
426426
public function resolveParamPureUnlessCallableIsImpure(PhpDocNode $phpDocNode): array
427427
{
428428
$parameters = [];
429-
// TODO: implement phpstan/phpdoc-parser
430-
foreach ($phpDocNode->getTagsByName('@pure-unless-callable-impure') as $tag) {
431-
$value = preg_split('/\s/u', (string)$tag->value)[0] ?? null;
432-
if ($value !== null && str_starts_with($value, '$')) {
433-
$parameters[substr($value, 1)] = true;
434-
}
429+
foreach ($phpDocNode->getPureUnlessCallableIsImpureTagValues() as $tag) {
430+
$parameters[$tag->parameterName] = true;
435431
}
436432

437433
return $parameters;

0 commit comments

Comments
 (0)