This PR fixes a bug in the code used to check if a equal sign is used to set a default value for a parameter. This bug caused a false positive when the function declaration was missing the closing parenthesis (which can happen during live coding).
Suggested changelog entry
Squiz.PHP.DisallowMultipleAssignments false positive for parameter default values when the closing parenthesis of the function declaration is missing.
Description
This PR fixes a bug in the code used to check if a equal sign is used to set a default value for a parameter. This bug caused a false positive when the function declaration was missing the closing parenthesis (which can happen during live coding).
Suggested changelog entry
Squiz.PHP.DisallowMultipleAssignments false positive for parameter default values when the closing parenthesis of the function declaration is missing.
Related issues/external references
Fixes https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/551
Types of changes
PR checklist