godaddy-wordpress / primer-child-velux

Velux is a Primer child theme with a clean, professional, and upscale design.
13 stars 7 forks source link

Adding php linting #82

Closed jrtashjian closed 4 years ago

jrtashjian commented 4 years ago

Current linting report:

FILE: functions.php
----------------------------------------------------------------------
FOUND 33 ERRORS AND 47 WARNINGS AFFECTING 76 LINES
----------------------------------------------------------------------
   1 | ERROR   | [ ] There must be no blank lines before the file
     |         |     comment
     |         |     (Squiz.Commenting.FileComment.SpacingAfterOpen)
   9 | ERROR   | [ ] There must be exactly one blank line after the
     |         |     file comment
     |         |     (Squiz.Commenting.FileComment.SpacingAfterComment)
   9 | ERROR   | [ ] Missing @package tag in file comment
     |         |     (Squiz.Commenting.FileComment.MissingPackageTag)
  10 | ERROR   | [ ] Global constants defined by a theme/plugin
     |         |     should start with the theme/plugin prefix.
     |         |     Found: "PRIMER_CHILD_VERSION".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound)
  18 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_move_elements".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
  20 | ERROR   | [x] Expected 1 space after comma in argument list;
     |         |     20 found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  20 | ERROR   | [x] Expected 1 space after comma in argument list;
     |         |     15 found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  21 | ERROR   | [x] Expected 1 space after comma in argument list;
     |         |     14 found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  22 | ERROR   | [x] Expected 1 space after comma in argument list;
     |         |     14 found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  22 | ERROR   | [x] Expected 1 space after comma in argument list; 9
     |         |     found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  23 | ERROR   | [x] Expected 1 space after comma in argument list; 4
     |         |     found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  25 | ERROR   | [x] Expected 1 space after comma in argument list; 5
     |         |     found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  25 | ERROR   | [x] Expected 1 space after comma in argument list;
     |         |     11 found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  27 | ERROR   | [x] Expected 1 space after comma in argument list;
     |         |     11 found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  52 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_add_mobile_menu".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
  66 | ERROR   | [ ] Missing parameter comment
     |         |     (Squiz.Commenting.FunctionComment.MissingParamComment)
  70 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_the_site_title".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
  75 | ERROR   | [x] Expected 1 space after comma in argument list; 7
     |         |     found
     |         |     (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
  84 | ERROR   | [ ] Missing parameter comment
     |         |     (Squiz.Commenting.FunctionComment.MissingParamComment)
  88 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_custom_logo_args".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
 104 | ERROR   | [ ] Missing parameter comment
     |         |     (Squiz.Commenting.FunctionComment.MissingParamComment)
 108 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_fonts".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
 125 | ERROR   | [ ] Missing parameter comment
     |         |     (Squiz.Commenting.FunctionComment.MissingParamComment)
 129 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_font_types".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
 138 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 4 space(s) between "'heading_font'" and
     |         |     double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 141 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 4 space(s) between "'primary_font'" and
     |         |     double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 144 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 2 space(s) between "'secondary_font'"
     |         |     and double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 160 | ERROR   | [ ] Missing parameter comment
     |         |     (Squiz.Commenting.FunctionComment.MissingParamComment)
 164 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_colors".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
 175 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'header_textcolor'" and double arrow, but found
     |         |     1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 176 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 1 space(s) between "'default'" and
     |         |     double arrow, but found 2.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 178 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 15 space(s) between
     |         |     "'tagline_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 179 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 1 space(s) between "'default'" and
     |         |     double arrow, but found 2.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 181 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 18 space(s) between "'hero_text_color'"
     |         |     and double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 184 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 18 space(s) between "'menu_text_color'"
     |         |     and double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 192 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 15 space(s) between
     |         |     "'heading_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 195 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 15 space(s) between
     |         |     "'primary_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 198 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'secondary_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 204 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 9 space(s) between
     |         |     "'footer_widget_text_color'" and double arrow,
     |         |     but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 207 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 11 space(s) between
     |         |     "'footer_menu_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 215 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 16 space(s) between
     |         |     "'footer_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 221 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 23 space(s) between "'link_color'" and
     |         |     double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 232 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between "'button_color'"
     |         |     and double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 235 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 16 space(s) between
     |         |     "'button_text_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 241 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'background_color'" and double arrow, but found
     |         |     1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 244 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 12 space(s) between
     |         |     "'hero_background_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 247 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 12 space(s) between
     |         |     "'menu_background_color'" and double arrow, but
     |         |     found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 256 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 3 space(s) between
     |         |     "'footer_widget_background_color'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 259 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 10 space(s) between
     |         |     "'footer_background_color'" and double arrow,
     |         |     but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 275 | ERROR   | [ ] Missing parameter comment
     |         |     (Squiz.Commenting.FunctionComment.MissingParamComment)
 279 | ERROR   | [ ] Functions declared in the global namespace by a
     |         |     theme/plugin should start with the theme/plugin
     |         |     prefix. Found: "velux_color_schemes".
     |         |     (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
 282 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 5 space(s) between "'blush'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 288 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 4 space(s) between "'bronze'" and
     |         |     double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 294 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 4 space(s) between "'canary'" and
     |         |     double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 300 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 6 space(s) between "'cool'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 306 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 6 space(s) between "'dark'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 308 | ERROR   | [ ] Inline comments must end in full-stops,
     |         |     exclamation marks, or question marks
     |         |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 309 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between
     |         |     "'tagline_text_color'" and double arrow, but
     |         |     found 15.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 310 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between
     |         |     "'heading_text_color'" and double arrow, but
     |         |     found 15.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 311 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between
     |         |     "'primary_text_color'" and double arrow, but
     |         |     found 15.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 312 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 19 space(s) between
     |         |     "'secondary_text_color'" and double arrow, but
     |         |     found 13.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 313 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 7 space(s) between
     |         |     "'footer_widget_heading_text_color'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 314 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 15 space(s) between
     |         |     "'footer_widget_text_color'" and double arrow,
     |         |     but found 9.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 315 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'footer_menu_text_color'" and double arrow, but
     |         |     found 11.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 316 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'footer_text_color'" and double arrow, but
     |         |     found 16.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 317 | ERROR   | [ ] Inline comments must end in full-stops,
     |         |     exclamation marks, or question marks
     |         |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 327 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 4 space(s) between "'iguana'" and
     |         |     double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 333 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 5 space(s) between "'muted'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 335 | ERROR   | [ ] Inline comments must end in full-stops,
     |         |     exclamation marks, or question marks
     |         |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 342 | ERROR   | [ ] Inline comments must end in full-stops,
     |         |     exclamation marks, or question marks
     |         |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 343 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 23 space(s) between "'link_color'" and
     |         |     double arrow, but found 3.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 344 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between "'button_color'"
     |         |     and double arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 345 | ERROR   | [ ] Inline comments must end in full-stops,
     |         |     exclamation marks, or question marks
     |         |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 346 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'background_color'" and double arrow, but found
     |         |     15.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 347 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 12 space(s) between
     |         |     "'hero_background_color'" and double arrow, but
     |         |     found 10.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 348 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 12 space(s) between
     |         |     "'menu_background_color'" and double arrow, but
     |         |     found 10.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 349 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 3 space(s) between
     |         |     "'footer_widget_background_color'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 350 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 10 space(s) between
     |         |     "'footer_background_color'" and double arrow,
     |         |     but found 8.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 353 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 6 space(s) between "'plum'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
 359 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 6 space(s) between "'rose'" and double
     |         |     arrow, but found 1.
     |         |     (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 57 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------