Repository navigation
Commit ad2e1bb
authored
[DowngradePhp81] Handle ArrowFunction in DowngradeNeverTypeDeclarationRector (#397)
A "never" return type on an arrow function is invalid below PHP 8.1, yet the rule only subscribed to Function_, ClassMethod and Closure, so fn(): never => ... was left untouched. Add ArrowFunction to the subscribed node types; the decorator already accepts it.
Assisted-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1beef93 commit ad2e1bb
2 files changed
Lines changed: 18 additions & 2 deletions
File tree
- rules-tests/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector/Fixture
- rules/DowngradePhp81/Rector/FunctionLike
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
0 commit comments