Fix coding standards

Created on 6 February 2023, about 2 years ago
Updated 8 June 2023, over 1 year ago

Problem/Motivation

A scan of the module identifies some coding standards issues:

 ./vendor/bin/phpcs -p --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md --ignore=node_modules,vendor ./web/modules/contrib/real_aes
EWE 3 / 3 (100%)



FILE: /var/www/html/web/modules/contrib/real_aes/real_aes.install
-----------------------------------------------------------------------------
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: /var/www/html/web/modules/contrib/real_aes/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
 15 | WARNING | Line exceeds 80 characters; contains 81 characters
 29 | WARNING | Line exceeds 80 characters; contains 84 characters
 31 | WARNING | Line exceeds 80 characters; contains 85 characters
 33 | WARNING | Line exceeds 80 characters; contains 87 characters
 42 | WARNING | Line exceeds 80 characters; contains 81 characters
 47 | WARNING | Line exceeds 80 characters; contains 83 characters
 48 | WARNING | Line exceeds 80 characters; contains 88 characters
 49 | WARNING | Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/real_aes/src/Plugin/EncryptionMethod/RealAESEncryptionMethod.php
---------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------------------
  8 | ERROR   | [x] When importing a class with "use", do not include a leading \
  9 | ERROR   | [x] When importing a class with "use", do not include a leading \
 10 | ERROR   | [x] When importing a class with "use", do not include a leading \
 11 | ERROR   | [x] When importing a class with "use", do not include a leading \
 19 | WARNING | [ ] Line exceeds 80 characters; contains 156 characters
 23 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 49 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 64 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡―πŸ‡΅Japan ptmkenny

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

Comments & Activities

  • Issue created by @ptmkenny
  • πŸ‡―πŸ‡΅Japan ptmkenny

    The MR fixes all issues except this one:

    FILE: /var/www/html/web/modules/contrib/real_aes/src/Plugin/EncryptionMethod/RealAESEncryptionMethod.php
    --------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------
     19 | WARNING | Line exceeds 80 characters; contains 156 characters
    --------------------------------------------------------------------------------------------------------
    

    I don't know what the proper way is to break up an annotation description into multiple lines.

  • Status changed to Needs review about 2 years ago
  • @ptmkenny opened merge request.
  • First commit to issue fork.
  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States rlhawk Seattle, Washington, United States

    I made a few additional changes and all coding standards tests pass.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States rlhawk Seattle, Washington, United States
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024