81 drupal standard issues

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sriparna Khatua created an issue. See original summary.

Sriparna Khatua’s picture

Issue tags: +Coding standards

Hi,

Found following errors

   8 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
   9 | WARNING | [ ] All constants defined by a module must be
     |         |     prefixed with the module's name, expected
     |         |     "USER_IMPORT_UPDATE_NONE" but found
     |         |     "UPDATE_NONE"
   9 | ERROR   | [x] Space before opening parenthesis of function
     |         |     call prohibited
  10 | WARNING | [ ] All constants defined by a module must be
     |         |     prefixed with the module's name, expected
     |         |     "USER_IMPORT_UPDATE_REPLACE" but found
     |         |     "UPDATE_REPLACE"
  10 | ERROR   | [x] Space before opening parenthesis of function
     |         |     call prohibited
  11 | WARNING | [ ] All constants defined by a module must be
     |         |     prefixed with the module's name, expected
     |         |     "USER_IMPORT_UPDATE_ADD" but found "UPDATE_ADD"
  11 | ERROR   | [x] Space before opening parenthesis of function
     |         |     call prohibited
  14 | ERROR   | [x] Doc comment short description must start with a
     |         |     capital letter
  14 | ERROR   | [x] Doc comment short description must end with a
     |         |     full stop
  18 | 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.".
  40 | ERROR   | [x] Inline comments must start with a capital letter
  41 | ERROR   | [ ] Comment indentation error, expected only 1
     |         |     spaces
  42 | ERROR   | [ ] Comment indentation error, expected only 3
     |         |     spaces
  43 | WARNING | [ ] Line exceeds 80 characters; contains 117
     |         |     characters
  43 | ERROR   | [ ] Comment indentation error, expected only 5
     |         |     spaces
  45 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
  45 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
  48 | 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.".
  65 | 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.".
 136 | 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.".
 149 | ERROR   | [x] Function comment short description must start
     |         |     with exactly one space
 151 | ERROR   | [ ] Wrong function doc comment end; expected "*/",
     |         |     found "**/"
 151 | ERROR   | [x] Additional blank lines found at end of doc
     |         |     comment
 192 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
 220 | WARNING | [ ] Code after RETURN statement cannot be executed
 222 | WARNING | [ ] Code after RETURN statement cannot be executed
 224 | WARNING | [ ] Code after RETURN statement cannot be executed
 225 | ERROR   | [x] Functions must not contain multiple empty lines
     |         |     in a row; found 2 empty lines
 228 | WARNING | [ ] Code after RETURN statement cannot be executed
 230 | WARNING | [ ] Code after RETURN statement cannot be executed
 232 | WARNING | [ ] Code after RETURN statement cannot be executed
 233 | WARNING | [ ] Code after RETURN statement cannot be executed
 234 | WARNING | [ ] Code after RETURN statement cannot be executed
 235 | WARNING | [ ] Code after RETURN statement cannot be executed
 236 | WARNING | [ ] Code after RETURN statement cannot be executed
 237 | ERROR   | [x] Functions must not contain multiple empty lines
     |         |     in a row; found 2 empty lines
 239 | WARNING | [ ] Code after RETURN statement cannot be executed
 240 | WARNING | [ ] Code after RETURN statement cannot be executed
 241 | WARNING | [ ] Code after RETURN statement cannot be executed
 242 | WARNING | [ ] Code after RETURN statement cannot be executed
 244 | WARNING | [ ] Code after RETURN statement cannot be executed
 245 | WARNING | [ ] Code after RETURN statement cannot be executed
 246 | WARNING | [ ] Code after RETURN statement cannot be executed
 248 | WARNING | [ ] Code after RETURN statement cannot be executed
 249 | WARNING | [ ] Code after RETURN statement cannot be executed
 250 | WARNING | [ ] Code after RETURN statement cannot be executed
 258 | WARNING | [ ] Code after RETURN statement cannot be executed
 258 | WARNING | [ ] Empty return statement not required here
 262 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
 262 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 265 | ERROR   | [x] Doc comment short description must end with a
     |         |     full stop
 266 | ERROR   | [x] There must be exactly one blank line before the
     |         |     tags in a doc comment
 270 | ERROR   | [x] Inline comments must start with a capital letter
 270 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 276 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
 276 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 278 | ERROR   | [ ] You must use "/**" style comments for a function
     |         |     comment
 300 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: )
 319 | ERROR   | [ ] If the line declaring an array spans longer than
     |         |     80 characters, each element should be broken
     |         |     into its own line
 328 | ERROR   | [ ] Missing short description in doc comment
 329 | ERROR   | [ ] Missing parameter comment
 330 | ERROR   | [ ] Missing parameter comment
 332 | ERROR   | [ ] Type hint "null" missing for $import_id
 332 | ERROR   | [ ] Type hint "null" missing for $template_id
 337 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
 337 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 340 | ERROR   | [ ] Missing short description in doc comment
 341 | ERROR   | [ ] Return comment must be on the next line
 347 | ERROR   | [x] Inline control structures are not allowed
 351 | ERROR   | [x] Inline comments must start with a capital letter
 351 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 353 | ERROR   | [ ] If the line declaring an array spans longer than
     |         |     80 characters, each element should be broken
     |         |     into its own line
 355 | ERROR   | [x] Inline comments must start with a capital letter
 355 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 370 | ERROR   | [x] Inline comments must start with a capital letter
 370 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 376 | ERROR   | [x] Inline control structures are not allowed
 377 | ERROR   | [x] Inline control structures are not allowed
 383 | ERROR   | [x] Missing function doc comment
 388 | ERROR   | [ ] If the line declaring an array spans longer than
     |         |     80 characters, each element should be broken
     |         |     into its own line
 419 | ERROR   | [x] Missing function doc comment
 469 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 475 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 475 | ERROR   | [x] Comments may not appear after statements
 478 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: )
 478 | WARNING | [ ] Line exceeds 80 characters; contains 96
     |         |     characters
 478 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 478 | ERROR   | [x] Comments may not appear after statements
 482 | ERROR   | [x] No space found before comment text; expected "//
     |         |     $output .= theme('table', array('header' =>
     |         |     $header, 'rows' => $rows));" but found
     |         |     "//$output .= theme('table', array('header' =>
     |         |     $header, 'rows' => $rows));"
 482 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 486 | ERROR   | [x] Missing function doc comment
 499 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
 499 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 501 | ERROR   | [ ] You must use "/**" style comments for a function
     |         |     comment
 503 | ERROR   | [x] The first index in a multi-value array must be
     |         |     on a new line
 504 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 505 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 506 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 507 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 508 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 509 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 510 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 511 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 512 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 513 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 514 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 515 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 516 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 27
 520 | ERROR   | [ ] If the line declaring an array spans longer than
     |         |     80 characters, each element should be broken
     |         |     into its own line
 532 | ERROR   | [x] Concat operator must be surrounded by a single
     |         |     space
 546 | ERROR   | [x] Concat operator must be surrounded by a single
     |         |     space
 555 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 4
 584 | ERROR   | [x] Missing function doc comment
 601 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: $setting
 622 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: $setting
 631 | WARNING | [ ] Line exceeds 80 characters; contains 89
     |         |     characters
 631 | ERROR   | [x] Function comment short description must start
     |         |     with exactly one space
 636 | ERROR   | [x] Inline control structures are not allowed
 640 | ERROR   | [x] Inline control structures are not allowed
 641 | ERROR   | [x] Functions must not contain multiple empty lines
     |         |     in a row; found 2 empty lines
 643 | ERROR   | [x] A cast statement must be followed by a single
     |         |     space
 645 | ERROR   | [x] Inline control structures are not allowed
 663 | ERROR   | [x] A cast statement must be followed by a single
     |         |     space
 679 | ERROR   | [x] Missing function doc comment
 688 | ERROR   | [ ] The second argument to watchdog() should not be
     |         |     enclosed with t()
 700 | WARNING | [ ] Empty return statement not required here
 703 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, or question marks
 704 | ERROR   | [ ] You must use "/**" style comments for a function
     |         |     comment
 719 | ERROR   | [x] Missing function doc comment
 758 | ERROR   | [x] "include_once" is a statement not a function; no
     |         |     parentheses are required
 758 | ERROR   | [x] Language constructs must be followed by a single
     |         |     space; expected "include_once (" but found
     |         |     "include_once("
 767 | 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.".
 777 | ERROR   | [ ] Missing short description in doc comment
 778 | ERROR   | [ ] Missing parameter comment
 778 | ERROR   | [ ] Missing parameter type
 779 | ERROR   | [ ] Missing parameter comment
 779 | ERROR   | [ ] Missing parameter type
 780 | ERROR   | [ ] Missing parameter comment
 780 | ERROR   | [ ] Missing parameter type
 781 | ERROR   | [ ] Missing parameter comment
 781 | ERROR   | [ ] Missing parameter type
 782 | ERROR   | [ ] Missing parameter comment
 789 | WARNING | [ ] Line exceeds 80 characters; contains 87
     |         |     characters
 802 | ERROR   | [x] Inline control structures are not allowed
 811 | WARNING | [ ] Empty return statement not required here
 812 | ERROR   | [x] Expected 1 newline at end of file; 6 found
 815 | ERROR   | [ ] More than 2 empty lines are not allowed
 816 | ERROR   | [ ] More than 2 empty lines are not allowed
 817 | ERROR   | [ ] More than 2 empty lines are not allowed
Sriparna Khatua’s picture

Assigned: Sriparna Khatua » Unassigned
anoopsingh92’s picture

Assigned: Unassigned » anoopsingh92

Hi, I am working on this issue. Thanks

Webbeh’s picture

Title: 81 drupal standard issues » PHP 8.1 fixes
Issue tags: -Coding standards

I think this is the intended title for this?

gisle’s picture

Assigned: anoopsingh92 » Unassigned
Status: Active » Needs work

We need a community member that uses PHP 8.1 to review this patch.

gisle’s picture

Status: Needs work » Needs review

Setting status to "Needs review".

anoopsingh92’s picture

I am not finding the patch for reviewing.

gisle’s picture

Title: PHP 8.1 fixes » User Import: Fix coding standards
Category: Bug report » Task
Status: Needs review » Active
Issue tags: +Coding standards

anoopsingh92, you're right, my mistake, seeting back to active.

In the first comment, Sriparna Khatua posted the output of the automated Coder code sniffing tool. To fix it, a patch or merge request is required. It has no impact on performance, the priority is "Minor". This is a minimally maintained project, so it will probably not be given much attention.

This issue has nothing to do with PHP 8 compatibility, so restoring the original title, but adding the module's name to better see what it is about when updates pop up in my inbox.

arti_parmar’s picture

Assigned: Unassigned » arti_parmar