Drupal Coding Standards Issues | phpcs

Created on 6 February 2023, over 2 years ago
Updated 20 August 2024, 9 months ago

Problem/Motivation

Getting following error.

FILE: /var/www/html/modules/contrib/webform_mass_email/src/Plugin/QueueWorker/WebformMassEmailQueue.php
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

Time: 1.5 secs; Memory: 6MB

Steps to reproduce

Run following command

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

Proposed resolution

Above error need to be fixed.

๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia samit.310@gmail.com

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

  • Issue created by @samit.310@gmail.com
  • Issue was unassigned.
  • Status changed to Needs review over 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia samit.310@gmail.com

    Above error are fixed.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Charchil Khandelwal โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to Charchil Khandelwal
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    I will review this.

  • @charchil-khandelwal opened merge request.
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Patch #2 tested and applied successfully, all the errors and warnings are fixed.
    Created MR for easy preview and commenting.
    RTBC +1.

    Thanks.

  • Status changed to RTBC 9 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines cleavinjosh

    Hi @Charchil Khandelwal,

    I applied MR!1, it was applied smoothly and fixed all phpcs issues

    โžœ  webform_mass_email git:(8bb411d) curl https://git.drupalcode.org/project/webform_mass_email/-/merge_requests/1.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1049    0  1049    0     0   3140      0 --:--:-- --:--:-- --:--:--  3140
    patching file src/Plugin/QueueWorker/WebformMassEmailQueue.php
    โžœ  webform_mass_email git:(8bb411d) โœ— ..
    โžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml webform_mass_email
    โžœ  contrib

    Thank you.

Production build 0.71.5 2024