File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 4646use function count ;
4747use function in_array ;
4848use function method_exists ;
49- use function preg_split ;
5049use function str_starts_with ;
5150use function substr ;
5251
@@ -423,18 +422,13 @@ public function resolveParamImmediatelyInvokedCallable(PhpDocNode $phpDocNode):
423422 public function resolveParamPureUnlessCallableIsImpure (PhpDocNode $ phpDocNode ): array
424423 {
425424 $ 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- }
425+ foreach ($ phpDocNode ->getPureUnlessCallableIsImpureTagValues () as $ tag ) {
426+ $ parameters [$ tag ->parameterName ] = true ;
432427 }
433428
434429 return $ parameters ;
435430 }
436431
437-
438432 /**
439433 * @return array<string, ParamClosureThisTag>
440434 */
You can’t perform that action at this time.
0 commit comments