Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File::getMethodParameters(): fix incorrect
$typeHintEndToken
Given the following code sample: ```php function foo( ?bool $a, $b ) {} ``` In the resulting array, the second parameter `$b` will have the 'type_hint_end_token' set to the stack pointer for the end of the type declaration for `$a`. Caused by the `$typeHintEndToken` not being reset for the next parameter. I've re-ordered the variable reset now to be the same as the order used for the initial variable declarations before the loop to make it more obvious. While not necessarily a bug, the `$currVar` variable was also not being reset. That's also been fixed now. I've not added a unit test as the existing tests do not check the token positions in the array.
- Loading branch information