Closed (fixed)
Project:
Top Commenters
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2016 at 10:27 UTC
Updated:
14 Dec 2016 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
keshavv commentedHere is a patch for coding standard in module.info file
Comment #3
amit.drupal commentedsome more Coding standard issue in modules.
FILE: ...pal/sites/all/modules/top_commenters/inc/top_commenters.page.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
| | line (Drupal.WhiteSpace.OpenTagNewline.BlankLine)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...al/sites/all/modules/top_commenters/inc/top_commenters.admin.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
| | line (Drupal.WhiteSpace.OpenTagNewline.BlankLine)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...c/views/top_commenters_views_handler_sort_user_comment_count.inc
----------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
| | (Drupal.Commenting.ClassComment.Missing)
8 | ERROR | [ ] Class name must begin with a capital letter
| | (Drupal.NamingConventions.ValidClassName.StartWithCaptial)
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
| | (Drupal.NamingConventions.ValidClassName.NoUnderscores)
9 | ERROR | [x] Missing function doc comment
| | (Drupal.Commenting.FunctionComment.Missing)
9 | ERROR | [x] Visibility must be declared on method "query"
| | (Drupal.Scope.MethodScope.Missing)
9 | ERROR | [x] Expected 1 blank line before function; 0 found
| | (Squiz.WhiteSpace.FunctionSpacing.Before)
12 | ERROR | [x] Expected 1 blank line after function; 0 found
| | (Squiz.WhiteSpace.FunctionSpacing.After)
13 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
| | (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../views/top_commenters_views_handler_field_user_comment_count.inc
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
| | (Drupal.Commenting.ClassComment.Missing)
8 | ERROR | [ ] Class name must begin with a capital letter
| | (Drupal.NamingConventions.ValidClassName.StartWithCaptial)
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
| | (Drupal.NamingConventions.ValidClassName.NoUnderscores)
9 | ERROR | [x] Missing function doc comment
| | (Drupal.Commenting.FunctionComment.Missing)
9 | ERROR | [x] Visibility must be declared on method "query"
| | (Drupal.Scope.MethodScope.Missing)
9 | ERROR | [x] Expected 1 blank line before function; 0 found
| | (Squiz.WhiteSpace.FunctionSpacing.Before)
16 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
| | 3 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
17 | ERROR | [x] Expected 1 blank line after function; 0 found
| | (Squiz.WhiteSpace.FunctionSpacing.After)
18 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
| | (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...es/all/modules/top_commenters/inc/views/top_commenters.views.inc
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | Format should be "* Implements hook_foo().", "* Implements
| | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
| | (Drupal.Commenting.HookComment)
----------------------------------------------------------------------
Comment #4
amit.drupal commentedComment #5
amit.drupal commentedComment #6
amit.drupal commentednot fix issues.
8 | ERROR | [x] Missing class doc comment
| | (Drupal.Commenting.ClassComment.Missing)
8 | ERROR | [ ] Class name must begin with a capital letter
| | (Drupal.NamingConventions.ValidClassName.StartWithCaptial)
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
Please advice.
Comment #7
prashant.c@amit.drupal
1. Doc block for class is already there.
2. Class name you can change to camel case.
you will have to test views integration for this module after making changes to class name.
Comment #8
Anuj786 commentedspaces on the file top_commenters_views_handler_sort_user_comment_count.inc were not needed.
submitting patch and interdiff after changes.
Comment #10
prashant.cThanks to all the contributors.