RemovedOptionalBeforeRequiredParam: bug fix - false positive on variadic params by jrfnl · Pull Request #1206 · PHPCompatibility/PHPCompatibility

@jrfnl

…dic params

_PR 1165 introduced a new PHP 8.0 related sniff. This sniff has not been in a released version of PHPCompatibility yet._

Variadic parameters are optional by nature. They also MUST be declared last in the parameter list and this requirement has been in place since their introduction.

In other words: variadic parameters should be ignored completely for the purposes of this sniff.

Includes unit tests.

wimg

wimg approved these changes Aug 16, 2020

@wimg wimg deleted the feature/removedoptionalbeforerequiredparams-bugfix branch

August 16, 2020 22:31