Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 24, 2025

fixes

Parse error: tests/PHPStan/Rules/DeadCode/data/call-to-static-method-without-impure-points-pipe.php:17
    15| function (): void {
    16| 	5 |> Foo::doFoo(...);
  > 17| 	5 |> fn ($x) => Foo::doFoo($x);
    18| };
Arrow functions on the right hand side of |> must be parenthesized
------------------------------------------------------------
Parse error: tests/PHPStan/Rules/DeadCode/data/call-to-function-without-impure-points-pipe.php:10
     8| 
     9| 5 |> myFunc(...);
  > 10| 5 |> fn ($x) => myFunc($x);
Arrow functions on the right hand side of |> must be parenthesized
------------------------------------------------------------
Parse error: tests/PHPStan/Rules/DeadCode/data/call-to-method-without-impure-points-pipe.php:18
    16| 	$foo = new Foo();
    17| 	5 |> $foo->maybePure(...);
  > 18| 	5 |> fn ($x) => $foo->maybePure($x);
    19| };
Arrow functions on the right hand side of |> must be parenthesized

as it seems they will not get rid of this caveats

@ondrejmirtes
Copy link
Member

Opened nikic/PHP-Parser#1124.

@ondrejmirtes ondrejmirtes merged commit acf7f97 into phpstan:2.1.x Oct 24, 2025
283 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the lint85 branch October 24, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants