GitLab CI reports a PHP_CodeSniffer error which should be fixed.

FILE: ...r-3373142/src/Plugin/WebformHandler/SubmissionSimplenewsWebformHandler.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\webform\Utility\WebformOptionsHelper.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 203ms; Memory: 6MB

 

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

Indrapatil created an issue. See original summary.

indrapatil’s picture

Assigned: indrapatil » Unassigned
Status: Active » Needs review
avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Priority: Normal » Minor
avpaderno’s picture

Status: Needs review » Needs work

bharath-kondeti made their first commit to this issue’s fork.

viren18febs’s picture

Status: Needs work » Needs review
rudrakumar188’s picture

By Running

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig /var/www/html/VB/drupal-10.1.0/modules/contrib/webform_simplenews_handler-2.0.1

was able to reproduce error in D10.1 and MR request fixes the error.

a.aaronjake’s picture

Hi @bharath_kondeti,

Applied the changes you committed on MR!3, it was applied not-so successfully, but miraculously, there are no errors reported.

➜  webform_simplenews_handler git:(2.0.x) curl https://git.drupalcode.org/project/webform_simplenews_handler/-/merge_requests/3.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1805    0  1805    0     0   4388      0 --:--:-- --:--:-- --:--:--  4467
patching file README.md
patching file src/Plugin/WebformHandler/SubmissionSimplenewsWebformHandler.php
patching file webform_simplenews_handler.info.yml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file webform_simplenews_handler.info.yml.rej
➜  webform_simplenews_handler git:(2.0.x) ✗ ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig webform_simplenews_handler
➜  contrib git:(master) ✗

Will not transition this yet so that others will review it too.

Thanks,
Jake

avpaderno’s picture

Status: Needs review » Reviewed & tested by the community

avpaderno’s picture

Issue summary: View changes

avpaderno changed the visibility of the branch 3373142-gitlab-ci-reports to hidden.

vuil’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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