Hi people.

I fixed itens of Drupal Best practices: https://www.drupal.org/docs/7/site-building-best-practices/best-practices
And Drupal Coding standards: https://www.drupal.org/docs/develop/standards

----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 56 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------


FILE: ...upal/sites/all/modules/domain_variable/domain_variable.admin.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 12 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...upal/sites/all/modules/domain_variable/domain_variable.class.inc
----------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 9 LINES
----------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one
    |         |     blank line
  5 | ERROR   | [x] There must be exactly one blank line after the
    |         |     file comment
 13 | WARNING | [ ] Line exceeds 80 characters; contains 81
    |         |     characters
 15 | ERROR   | [x] Expected 1 blank line before function; 0 found
 23 | ERROR   | [x] Expected 1 blank line after function; 0 found
 29 | ERROR   | [x] Expected 1 blank line after function; 0 found
 35 | ERROR   | [x] Expected 1 blank line after function; 0 found
 45 | ERROR   | [x] Expected 1 blank line after function; 0 found
 46 | ERROR   | [x] The closing brace for the class must have an
    |         |     empty line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...Drupal/sites/all/modules/domain_variable/domain_variable.install
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one
    |       |     blank line
  4 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 12 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing
    |       |     parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../Drupal/sites/all/modules/domain_variable/domain_variable.module
----------------------------------------------------------------------
FOUND 17 ERRORS AND 1 WARNING AFFECTING 17 LINES
----------------------------------------------------------------------
   4 | ERROR   | [x] The second line in the file doc comment must be
     |         |     "@file"
  28 | ERROR   | [ ] The @see reference should not contain any
     |         |     additional text
  29 | ERROR   | [ ] The @see reference should not contain any
     |         |     additional text
  37 | ERROR   | [x] Inline control structures are not allowed
  72 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
  75 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
  77 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
  88 | ERROR   | [x] Inline control structures are not allowed
  93 | 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.",
     |         |     "* Implements hook_foo_BAR_ID_bar() for
     |         |     xyz-bar.tpl.php.", or "* Implements
     |         |     hook_foo_BAR_ID_bar() for block templates."
  97 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 108 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 124 | ERROR   | [ ] Missing parameter type
 126 | ERROR   | [ ] Missing parameter type
 128 | ERROR   | [ ] Missing parameter type
 130 | ERROR   | [ ] Missing parameter type
 133 | ERROR   | [x] Separate the @param and @return sections by a
     |         |     blank line.
 133 | ERROR   | [ ] Return type missing for @return tag in function
     |         |     comment
 155 | ERROR   | [ ] domain_variable_requirements() is an
     |         |     installation hook and must be declared in an
     |         |     install file
----------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...l/sites/all/modules/domain_variable/domain_variable.variable.inc
----------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 12 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one
    |       |     blank line
  5 | ERROR | [x] There must be exactly one blank line after the file
    |       |     comment
 17 | ERROR | [x] Expected 1 blank line before function; 2 found
 35 | ERROR | [x] No space found before comment text; expected "//
    |       |     'menu_options_[node_type]', //??" but found
    |       |     "//'menu_options_[node_type]', //??"
 36 | ERROR | [x] No space found before comment text; expected "//
    |       |     'menu_parent_[node_type]', //??" but found
    |       |     "//'menu_parent_[node_type]', //??"
 52 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing
    |       |     parentheses
 53 | ERROR | [ ] If the line declaring an array spans longer than 80
    |       |     characters, each element should be broken into its
    |       |     own line
 62 | ERROR | [ ] Doc comment short description must be on a single
    |       |     line, further text should be a separate paragraph
 65 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing
    |       |     parentheses
 66 | ERROR | [x] Inline control structures are not allowed
 68 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing
    |       |     parentheses
 78 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing
    |       |     parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...omain_variable/domain_variable_i18n/domain_variable_i18n.install
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one
    |       |     blank line
  4 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 12 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing
    |       |     parentheses
 13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     3
 14 | ERROR | [x] Object operator not indented correctly; expected 5
    |       |     spaces but found 4
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...domain_variable/domain_variable_i18n/domain_variable_i18n.module
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one
   |       |     blank line
 4 | ERROR | [x] Doc comment short description must end with a full
   |       |     stop
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...main_variable/domain_variable_locale/domain_variable_locale.info
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...in_variable/domain_variable_locale/domain_variable_locale.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one
   |       |     blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...iable/domain_variable_locale/domain_variable_locale.variable.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one
    |       |     blank line
 30 | ERROR | [x] Return type must not contain variable name
    |       |     "$language_list"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...domain_variable/domain_variable_theme/domain_variable_theme.info
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...main_variable/domain_variable_theme/domain_variable_theme.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one
   |       |     blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...ariable/domain_variable_theme/domain_variable_theme.variable.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one
   |       |     blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
CommentFileSizeAuthor
#2 resolved_drupal_best-2894359-2.patch15.55 KBrenatog
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RenatoG created an issue. See original summary.

renatog’s picture

Fixed.

Patch with fix it's in attachment.

Good Work.

Regards.

  • RenatoG committed 0e2dfd4 on 7.x-1.x
    Issue #2894359 by RenatoG: Resolved Drupal Best practices and Fixed...
renatog’s picture

Status: Active » Fixed

Fixed.

Commited in dev branch.

Regards.

Status: Fixed » Closed (fixed)

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