| @@ 782-801 (lines=20) @@ | ||
| 779 | continue; |
|
| 780 | } |
|
| 781 | ||
| 782 | if ($codebase->properties_to_rename) { |
|
| 783 | $declaring_property_id = strtolower($declaring_property_class) . '::$' . $prop_name; |
|
| 784 | ||
| 785 | foreach ($codebase->properties_to_rename as $original_property_id => $new_property_name) { |
|
| 786 | if ($declaring_property_id === $original_property_id) { |
|
| 787 | $file_manipulations = [ |
|
| 788 | new \Psalm\FileManipulation( |
|
| 789 | (int) $stmt->name->getAttribute('startFilePos'), |
|
| 790 | (int) $stmt->name->getAttribute('endFilePos') + 1, |
|
| 791 | $new_property_name |
|
| 792 | ) |
|
| 793 | ]; |
|
| 794 | ||
| 795 | \Psalm\Internal\FileManipulation\FileManipulationBuffer::add( |
|
| 796 | $statements_analyzer->getFilePath(), |
|
| 797 | $file_manipulations |
|
| 798 | ); |
|
| 799 | } |
|
| 800 | } |
|
| 801 | } |
|
| 802 | ||
| 803 | $declaring_class_storage = $codebase->classlike_storage_provider->get( |
|
| 804 | $declaring_property_class |
|
| @@ 641-660 (lines=20) @@ | ||
| 638 | false |
|
| 639 | ); |
|
| 640 | ||
| 641 | if ($codebase->properties_to_rename) { |
|
| 642 | $declaring_property_id = strtolower($declaring_property_class) . '::$' . $prop_name; |
|
| 643 | ||
| 644 | foreach ($codebase->properties_to_rename as $original_property_id => $new_property_name) { |
|
| 645 | if ($declaring_property_id === $original_property_id) { |
|
| 646 | $file_manipulations = [ |
|
| 647 | new \Psalm\FileManipulation( |
|
| 648 | (int) $stmt->name->getAttribute('startFilePos'), |
|
| 649 | (int) $stmt->name->getAttribute('endFilePos') + 1, |
|
| 650 | $new_property_name |
|
| 651 | ) |
|
| 652 | ]; |
|
| 653 | ||
| 654 | \Psalm\Internal\FileManipulation\FileManipulationBuffer::add( |
|
| 655 | $statements_analyzer->getFilePath(), |
|
| 656 | $file_manipulations |
|
| 657 | ); |
|
| 658 | } |
|
| 659 | } |
|
| 660 | } |
|
| 661 | ||
| 662 | $declaring_class_storage = $codebase->classlike_storage_provider->get($declaring_property_class); |
|
| 663 | ||