hi,

I have found some issues related to the coding standard. I am using Coder to find the errors.

----------------------------------------------------------------------
FOUND 74 ERRORS AND 4 WARNINGS AFFECTING 72 LINES
----------------------------------------------------------------------
135 | ERROR | [ ] If the line declaring an array spans longer
| | than 80 characters, each element should be
| | broken into its own line
151 | ERROR | [ ] If the line declaring an array spans longer
| | than 80 characters, each element should be
| | broken into its own line
266 | ERROR | [ ] If the line declaring an array spans longer
| | than 80 characters, each element should be
| | broken into its own line
298 | ERROR | [ ] Doc comment short description must be on a
| | single line, further text should be a separate
| | paragraph
300 | ERROR | [x] Expected "object" but found "stdClass" for
| | parameter type
303 | ERROR | [ ] Expected "bool" but found "boolean" for
| | function return type
367 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
368 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
369 | ERROR | [x] No space found before comment text; expected
| | "// // facetapi_*_load() functions" but found
| | "//// facetapi_*_load() functions"
370 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
371 | WARNING | [x] There must be no blank line following an inline
| | comment
371 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
371 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, or question marks
376 | ERROR | [ ] Missing parameter type
402 | ERROR | [ ] Missing parameter type
404 | ERROR | [ ] Missing parameter type
427 | ERROR | [ ] Missing parameter type
429 | ERROR | [ ] Missing parameter type
446 | ERROR | [ ] Missing parameter type
469 | ERROR | [ ] Missing parameter type
471 | ERROR | [ ] Missing parameter type
474 | ERROR | [ ] Return type missing for @return tag in function
| | comment
521 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
522 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
523 | ERROR | [x] No space found before comment text; expected
| | "// // facetapi_get_*() functions" but found
| | "//// facetapi_get_*() functions"
524 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
525 | WARNING | [x] There must be no blank line following an inline
| | comment
525 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
525 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, or question marks
645 | ERROR | [ ] Missing parameter type
762 | ERROR | [ ] Missing parameter type
764 | ERROR | [ ] Missing parameter type
845 | ERROR | [ ] Missing parameter type
871 | ERROR | [ ] Missing parameter type
873 | ERROR | [ ] Missing parameter type
906 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
907 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
908 | ERROR | [x] No space found before comment text; expected
| | "// // Utility functions" but found "////
| | Utility functions"
909 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
910 | WARNING | [x] There must be no blank line following an inline
| | comment
910 | ERROR | [x] No space found before comment text; expected
| | "// //" but found "////"
910 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, or question marks
915 | ERROR | [ ] Missing parameter type
918 | ERROR | [ ] Missing parameter type
920 | ERROR | [ ] Missing parameter type
924 | ERROR | [ ] Return type missing for @return tag in function
| | comment
940 | ERROR | [ ] Missing parameter type
954 | ERROR | [ ] Missing parameter type
967 | ERROR | [ ] Missing parameter type
969 | ERROR | [ ] Missing parameter type
972 | ERROR | [ ] Missing parameter type
975 | ERROR | [ ] Return type missing for @return tag in function
| | comment
989 | ERROR | [ ] Missing parameter type
991 | ERROR | [ ] Missing parameter type
1015 | ERROR | [ ] Return type missing for @return tag in function
| | comment
1033 | ERROR | [ ] Missing parameter type
1035 | ERROR | [ ] Missing parameter type
1037 | ERROR | [ ] Missing parameter type
1039 | ERROR | [ ] Missing parameter type
1041 | ERROR | [ ] Missing parameter type
1101 | ERROR | [ ] Missing parameter type
1103 | ERROR | [ ] Missing parameter type
1105 | ERROR | [ ] Missing parameter type
1107 | ERROR | [ ] Missing parameter type
1111 | ERROR | [ ] Trailing punctuation for @see references is not
| | allowed.
1120 | ERROR | [ ] Missing parameter type
1122 | ERROR | [ ] Missing parameter type
1124 | ERROR | [ ] Missing parameter type
1126 | ERROR | [ ] Missing parameter type
1144 | ERROR | [ ] Missing parameter type
1146 | ERROR | [ ] Missing parameter type
1149 | ERROR | [ ] Missing parameter type
1190 | ERROR | [ ] Missing parameter type
1193 | ERROR | [ ] Missing parameter type
1212 | ERROR | [ ] Missing parameter type
1215 | ERROR | [ ] Missing parameter type
1233 | WARNING | [x] A comma should follow the last multiline array
| | item. Found: I18N_STRING_FILTER_XSS
1236 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

harivenu_zyxware created an issue. See original summary.

harivenuv’s picture

Hi,

I created a patch to resolve the coding standard related issues using drupal coder. Please verify the patch.

----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
382 | WARNING | [x] There must be no blank line following an inline
| | comment
532 | WARNING | [x] There must be no blank line following an inline
| | comment
913 | WARNING | [x] There must be no blank line following an inline
| | comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

There are 3 warning left. Anyone can take the above issues.

Thank You,

harivenuv’s picture

Assigned: harivenuv » Unassigned
Status: Active » Needs review

  • eugene.ilyin committed c2f0fd7 on 7.x-1.x
    Issue #2833007 by harivenu_zyxware: Coding standard related issues in...
eugene.ilyin’s picture

Hello. I've applied your patch with some changes. Thank you.

eugene.ilyin’s picture

Status: Needs review » Fixed
harivenuv’s picture

hi eugene.ilyin,

Thank you for considering my patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.