You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a return type declaration was not confined to one line, the sniff could have a fixer conflict with itself.
The fixer would also potentially remove a close curly on the same line, causing parse errors.
Fixed now. The diff will be most straight forward to review while ignoring whitespace changes.
Includes unit tests.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,8 @@ The file documents changes to the PHP_CodeSniffer project.
111
111
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
112
112
- Fixed bug #3736 : PEAR/FunctionDeclaration: prevent fixer removing the close brace (and creating a parse error) when there is no space between the open brace and close brace of a function
113
113
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
114
+
- Fixed bug #3739 : PEAR/FunctionDeclaration: prevent fixer conflict (and potentially creating a parse error) for unconventionally formatted return types
115
+
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
114
116
- Fixed bug #3770 : Squiz/NonExecutableCode: prevent false positives for switching between PHP and HTML
115
117
- Thanks to Dan Wallis (@fredden) for the patch
116
118
- Fixed bug #3773 : Tokenizer/PHP: tokenization of the readonly keyword when used in combination with PHP 8.2 disjunctive normal types
$error = 'There must be a single space between the closing parenthesis/return type and the opening brace of a multi-line function declaration; found %s spaces';
0 commit comments