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
938 | ERROR | [x] Opening brace should be on the same line as the declaration (WordPress.WhiteSpace.ControlStructureSpacing.OpenBraceNotSameLine)
938 | ERROR | [x] Expected 1 space(s) after closing parenthesis; found "\n $" (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
939 | ERROR | [x] Newline required after opening brace (Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace)
939 | ERROR | [x] Array keys must NOT be surrounded by spaces if they only contain a string or an integer. (WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys)
939 | ERROR | [x] Array keys must NOT be surrounded by spaces if they only contain a string or an integer. (WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys)
The text was updated successfully, but these errors were encountered:
This looks to me like a known upstream issue with the Generic.ControlStructures.InlineControlStructure sniff which is getting confused over the curly braces of the variable variable.
FYI: a fix has just been committed upstream which should take care of this. The fix will be included in the 3.3.0 release. If you would happen to have the chance to test it, that'd be great!
Original code:
After
phpcbf
with PHP 7.1.7, this results in:Instead of:
Report:
The text was updated successfully, but these errors were encountered: