NewNumberFormatMultibyteSeparators: add support for named parameters by jrfnl · Pull Request #1380 · PHPCompatibility/PHPCompatibility

@jrfnl

1. Add support for function calls using named parameters by implementing the new PHPCSUtils 1.0.0-alpha4 `PassedParameters::getParameterFromStack()` method.
2. Verified the parameter name used is in line with the name as per the PHP 8.0 release.
    PHP itself renamed a lot of parameters in PHP 8.0. As named parameters did not exist before PHP 8.0, the parameter name as per PHP 8.0 (or above) is the only relevant name.

Name verification reference:
* `number_format`: https://3v4l.org/R7DRe

Includes adding/adjusting the unit tests to include tests using named parameters.

Note: this is changes the error code for both violations, but as this is a new sniff which is being introduced in PHPCompatibility 10.0.0, this is not an issue.

@jrfnl jrfnl mentioned this pull request

Oct 26, 2022

41 tasks

wimg

wimg approved these changes Oct 31, 2022

@wimg wimg deleted the feature/1239-newnumberformatmultibyteseparators-support-named-params branch

October 31, 2022 15:23