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
---------------------------------------------------------------------------------------------------------------------------------
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:

Comments

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Status: Active » Needs review
paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

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.

ptmkenny’s picture

  • ptmkenny committed 513fb0b3 on 1.0.x
    Issue #3425182 by ptmkenny, paraderojether: Fix coding standards
    
ptmkenny’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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