Fix the warnings/errors reported by PHP_CodeSniffer

Created on 10 July 2023, over 1 year ago
Updated 24 July 2023, over 1 year ago

Problem/Motivation

FILE: /home/lenovo/d7to9/web/modules/contrib/dropfort_update/LICENSE.txt
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
 339 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/dropfort_update/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 16 WARNINGS AFFECTING 16 LINES
----------------------------------------------------------------------
  6 | WARNING | Line exceeds 80 characters; contains 135 characters
 15 | WARNING | Line exceeds 80 characters; contains 88 characters
 25 | WARNING | Line exceeds 80 characters; contains 319 characters
 30 | WARNING | Line exceeds 80 characters; contains 144 characters
 32 | WARNING | Line exceeds 80 characters; contains 597 characters
 34 | WARNING | Line exceeds 80 characters; contains 237 characters
 36 | WARNING | Line exceeds 80 characters; contains 172 characters
 39 | WARNING | Line exceeds 80 characters; contains 298 characters
 41 | WARNING | Line exceeds 80 characters; contains 117 characters
 45 | WARNING | Line exceeds 80 characters; contains 94 characters
 47 | WARNING | Line exceeds 80 characters; contains 168 characters
 48 | WARNING | Line exceeds 80 characters; contains 167 characters
 55 | WARNING | Line exceeds 80 characters; contains 415 characters
 57 | WARNING | Line exceeds 80 characters; contains 396 characters
 62 | WARNING | Line exceeds 80 characters; contains 307 characters
 63 | WARNING | Line exceeds 80 characters; contains 92 characters
----------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/dropfort_update/dropfort_update.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\UrlHelper.
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

Time: 86ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dropfort_update/

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: outdated

Version

2.1

Component

Code

Created by

🇮🇳India roshni27

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 @roshni27
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India roshni27

    Some issues are pending because of reading purpose. Please review the patch.

  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi @roshni27,

    I reviewed the changes and confirmed the Patch was applied cleanly to the Dropfort Update module against 2.1.x-dev on Drupal 9.5.10.

    Checking patch LICENSE.txt...
    Checking patch dropfort_update.module...
    Applied patch LICENSE.txt cleanly.
    Applied patch dropfort_update.module cleanly.

    However, I'm still moving this to Needs Work for now due to pending errors:

    FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/dropfort_update/README.md
    -----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 16 WARNINGS AFFECTING 16 LINES
    -----------------------------------------------------------------------------------------------------
      6 | WARNING | Line exceeds 80 characters; contains 135 characters
     15 | WARNING | Line exceeds 80 characters; contains 88 characters
     25 | WARNING | Line exceeds 80 characters; contains 319 characters
     30 | WARNING | Line exceeds 80 characters; contains 144 characters
     32 | WARNING | Line exceeds 80 characters; contains 597 characters
     34 | WARNING | Line exceeds 80 characters; contains 237 characters
     36 | WARNING | Line exceeds 80 characters; contains 172 characters
     39 | WARNING | Line exceeds 80 characters; contains 298 characters
     41 | WARNING | Line exceeds 80 characters; contains 117 characters
     45 | WARNING | Line exceeds 80 characters; contains 94 characters
     47 | WARNING | Line exceeds 80 characters; contains 168 characters
     48 | WARNING | Line exceeds 80 characters; contains 167 characters
     55 | WARNING | Line exceeds 80 characters; contains 415 characters
     57 | WARNING | Line exceeds 80 characters; contains 396 characters
     62 | WARNING | Line exceeds 80 characters; contains 307 characters
     63 | WARNING | Line exceeds 80 characters; contains 92 characters
    -----------------------------------------------------------------------------------------------------
    
    Time: 113ms; Memory: 10MB

    I ran this command on the module:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dropfort_update

    Thank you!

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India mrinalini9 New Delhi

    Updated patch #2 by addressing #3, please review it.

    Thanks!

  • Status changed to Closed: outdated over 1 year ago
  • 🇨🇦Canada minoroffense Ottawa, Canada

    Thanks but the docs were outdated so I ended up just rewriting them.

Production build 0.71.5 2024