:sparkles: PHP 8.0 | New `NewNamedParameters` sniff by jrfnl · Pull Request #1423 · PHPCompatibility/PHPCompatibility
PHP 8.0 introduces named function call parameters: ```php array_fill(start_index: 0, count: 100, value: 50); // Using reserved keywords as names is allowed. array_foobar(array: $array, switch: $switch, class: $class); ``` Ref: https://wiki.php.net/rfc/named_params This new sniff will detect the use of named parameters based on the support for this in PHPCSUtils as added in PHPCSStandards/PHPCSUtils 235 and PHPCSStandards/PHPCSUtils 383. Includes unit tests. **Open question**: should this sniff live in the `FunctionUse` category or in the `Syntax` category ?
jrfnl
mentioned this pull request
40 tasks
wimg approved these changes Dec 5, 2022
wimg
deleted the
php-8.0/new-namedparameters-sniff
branch
jrfnl
changed the title
✨ PHP 8.0 | New
✨ PHP 8.0 | New NewNamedParametersSniff sniffNewNamedParameters sniff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters