Fix coding standards

Created on 3 March 2024, 4 months ago
Updated 22 March 2024, 3 months ago

Problem/Motivation

./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/alternative_user_emails

Result:

FILE: /var/www/html/web/modules/contrib/alternative_user_emails/src/Plugin/Validation/Constraint/AlternativeUserEmailsValidator.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface.
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/alternative_user_emails/alternative_user_emails.module
---------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------
  10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\BaseFieldDefinition.
 132 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΅Japan ptmkenny

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

Merge Requests

Comments & Activities

  • Issue created by @ptmkenny
  • Merge request !4coding standard fixes β†’ (Merged) created by ptmkenny
  • Status changed to Needs review 4 months ago
  • Status changed to RTBC 4 months ago
  • πŸ‡΅πŸ‡­Philippines paraderojether

    Hi ptmkenny,

    I reviewed MR!4, confirmed it is applied cleanly and it fixes the issues reported by phpcs.

    jetherparadero@PrometSources-MacBook-Pro alternative_user_emails % curl https://git.drupalcode.org/project/alternative_user_emails/-/merge_requests/4.diff | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1732    0  1732    0     0   1216      0 --:--:--  0:00:01 --:--:--  1228
    Checking patch alternative_user_emails.module...
    Checking patch src/Plugin/Validation/Constraint/AlternativeUserEmailsValidator.php...
    Applied patch alternative_user_emails.module cleanly.
    Applied patch src/Plugin/Validation/Constraint/AlternativeUserEmailsValidator.php cleanly.
    jetherparadero@PrometSources-MacBook-Pro alternative_user_emails % cd ..
    jetherparadero@PrometSources-MacBook-Pro contrib % phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml alternative_user_emails
    jetherparadero@PrometSources-MacBook-Pro contrib %

    Moving this to RTBC.
    Thank you.

  • Pipeline finished with Skipped
    4 months ago
    #114310
  • Status changed to Fixed 4 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024