Comments

keshav.k created an issue. See original summary.

keshavv’s picture

StatusFileSize
new574 bytes

Here is a patch for coding standard in module.info file

amit.drupal’s picture

Title: Coding standard issue in module.info file » Code Standards Cleanup

some 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)
----------------------------------------------------------------------

amit.drupal’s picture

StatusFileSize
new3.41 KB
new3.03 KB
amit.drupal’s picture

Status: Active » Needs review
amit.drupal’s picture

not 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.

prashant.c’s picture

@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.

Anuj786’s picture

spaces on the file top_commenters_views_handler_sort_user_comment_count.inc were not needed.
submitting patch and interdiff after changes.

  • Prashant.c committed 6d34753 on 7.x-1.x authored by Anuj786
    Issue #2821650 by amit.drupal, Anuj786, keshav.k: Code Standards Cleanup
    
prashant.c’s picture

Status: Needs review » Fixed

Thanks to all the contributors.

Status: Fixed » Closed (fixed)

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