Fix the issues reported by phpcs

Created on 7 July 2023, almost 2 years ago
Updated 19 July 2023, almost 2 years ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig shows the following warnings/errors that should be fixed.

FILE: ./config_duplicator/src/Services/ConfigDuplicator.php
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Uuid\UuidInterface.
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: ./config_duplicator/README.md
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------
  3 | WARNING | Line exceeds 80 characters; contains 250 characters
  9 | WARNING | Line exceeds 80 characters; contains 99 characters
 20 | WARNING | Line exceeds 80 characters; contains 99 characters
 21 | WARNING | Line exceeds 80 characters; contains 121 characters
 23 | WARNING | Line exceeds 80 characters; contains 213 characters
-------------------------------------------------------------------------

FILE: ./config_duplicator/config_duplicator.info.yml
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------

Time: 43ms; Memory: 10MB
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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 @urvashi_vora
  • Status changed to Needs work almost 2 years ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
     * Generate a new set of config entities with new UUIDs
    -* Replace all instances of the keyword by a provided machine name in the new set of config entities
    +* Replace all instances of the keyword by a provided machine name in the new
    +set of config entities
    -* Replace `keyword` with the keyword used in the name of all config entities you want to duplicate.
    -* Replace `machine_name` with the machine name you want to use in the new config entities. This will replace the keyword.
    +* Replace `keyword` with the keyword used in the name of all config entities
    +you want to duplicate.
    +* Replace `machine_name` with the machine name you want to use in the new
    +config entities. This will replace the keyword.
    -* Double check the generated config. Because the keyword is replaced by the new machine name it may cause some unintended issues if the keyword is too broad or part of another keyword (e.g. "page" and "homepage").
    +* Double check the generated config. Because the keyword is replaced by the new
    +machine name it may cause some unintended issues if the keyword is too broad or

    Since those sentences are part of a list, the last line must be indented in all the three cases.

  • First commit to issue fork.
  • @bharath-kondeti opened merge request.
  • Status changed to Needs review almost 2 years ago
  • Status changed to RTBC almost 2 years ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The MR correctly changes the files for which PHP_CodeSniffer reported warnings/errors.

  • Status changed to Needs work almost 2 years ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Actually, when I run the command shown in the issue summary, I get a warning more.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Assigned to imustakim
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • 🇨🇦Canada imustakim Canada

    MR updated.
    Please review.

  • Status changed to Needs work almost 2 years ago
  • 🇵🇭Philippines paraderojether

    Hi, I reviewed MR!1, the MR is skipped and not applied successfully.

    Please check.
    Thank you.

  • Status changed to Needs review almost 2 years ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The MR is mergeable, which means Gitlab does not find any issue in the MR.

Production build 0.71.5 2024