Drupal coding standard issues

Created on 27 February 2023, almost 2 years ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

Resolve the below coding standard issue in the latest version.

FILE: /var/www/html/web/modules/custom/genpass/genpass.api.php
------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------
  6 | ERROR | [x] There must be exactly one blank line after the file comment
 14 | ERROR | [ ] Missing parameter comment
 14 | ERROR | [ ] Missing parameter name
 18 | ERROR | [x] Expected 1 blank line before function; 0 found
 33 | ERROR | [ ] Type hint "array" missing for $character_sets
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/genpass/genpass.module
--------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
 15 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 1
 16 | ERROR   | [x] Expected 2 space(s) before asterisk; 1 found
 17 | ERROR   | [x] Expected 2 space(s) before asterisk; 1 found
 76 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/genpass/genpass.install
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 19 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/genpass/src/InvalidCharacterSetsException.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
 7 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run the following command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/genpass/

Proposed resolution

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
💬 Support request
Status

Fixed

Version

2.0

Component

Miscellaneous

Created by

🇮🇳India arunkumark Coimbatore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024