Commit 379d638
committed
fix(renaming): Ensure scope attribute is set for variable nodes
- Add a check to ensure the scope attribute is set on nodes.
- If the scope is not an instance of Scope, fetch and set it from the parent node.
- This change improves the handling of node attributes in the renaming process.1 parent a40a6d3 commit 379d638
File tree
4 files changed
+24
-17
lines changed- src/Rector/Name
- tests/Rector/Name/RenameToConventionalCaseNameRector/Fixture
4 files changed
+24
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| 381 | + | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | 385 | | |
| |||
404 | 408 | | |
405 | 409 | | |
406 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
407 | 414 | | |
408 | 415 | | |
409 | | - | |
410 | | - | |
411 | | - | |
| 416 | + | |
412 | 417 | | |
413 | | - | |
| 418 | + | |
414 | 419 | | |
| 420 | + | |
| 421 | + | |
415 | 422 | | |
416 | 423 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
422 | 431 | | |
423 | 432 | | |
424 | 433 | | |
| |||
757 | 766 | | |
758 | 767 | | |
759 | 768 | | |
760 | | - | |
| 769 | + | |
761 | 770 | | |
762 | 771 | | |
763 | 772 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
| 24 | + | |
27 | 25 | | |
28 | | - | |
| 26 | + | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
0 commit comments