Fix the issues reported by phpcs

Created on 19 March 2025, 17 days ago

Problem/Motivation

FILE: /var/www/html/maxlength/maxlength.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
254 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /var/www/html/maxlength/maxlength.install
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
11 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
12 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /var/www/html/maxlength/tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /var/www/html/maxlength/tests/src/FunctionalJavascript/MaxLengthCustomWidgetTest.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 21 WARNINGS AFFECTING 7 LINES
------------------------------------------------------------------------------------------
89 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
89 | WARNING | [x] There must be no blank line following an inline comment
89 | WARNING | [ ] There must be no blank line following an inline comment
95 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
95 | WARNING | [x] There must be no blank line following an inline comment
95 | WARNING | [ ] There must be no blank line following an inline comment
104 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
104 | WARNING | [x] There must be no blank line following an inline comment
104 | WARNING | [ ] There must be no blank line following an inline comment
113 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
113 | WARNING | [x] There must be no blank line following an inline comment
113 | WARNING | [ ] There must be no blank line following an inline comment
118 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
118 | WARNING | [x] There must be no blank line following an inline comment
118 | WARNING | [ ] There must be no blank line following an inline comment
124 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
124 | WARNING | [x] There must be no blank line following an inline comment
124 | WARNING | [ ] There must be no blank line following an inline comment
133 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
133 | WARNING | [x] There must be no blank line following an inline comment
133 | WARNING | [ ] There must be no blank line following an inline comment
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

Time: 385ms; Memory: 6MB

šŸ“Œ Task
Status

Active

Version

3.1

Component

Code

Created by

šŸ‡®šŸ‡³India GGH

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @GGH
  • šŸ‡®šŸ‡³India GGH

    MR Raised

  • Pipeline finished with Success
    17 days ago
    Total: 303s
    #451916
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi

    I reviewed MR!59 confirmed it passed phcps using Gitlab CI. However there are still phpcs issues found using PHP_CodeSniffer shown below:

    āžœ  maxlength git:(main) āœ— curl https://git.drupalcode.org/project/maxlength/-/merge_requests/59.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  5215    0  5215    0     0  17373      0 --:--:-- --:--:-- --:--:-- 17677
    patching file maxlength.install
    patching file maxlength.module
    patching file 'tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php'
    patching file 'tests/src/FunctionalJavascript/MaxLengthCustomWidgetTest.php'
    āžœ  maxlength git:(main) āœ— cd ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig maxlength
    
    FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/maxlength/tests/src/FunctionalJavascript/MaxLengthCustomLinkWidgetTest.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\field\Entity\FieldStorageConfig.
    --------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/maxlength/maxlength.module
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------
     11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\WidgetInterface.
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    Time: 304ms; Memory: 12MB

    Will retain the status to Needs Review so that others can also check.
    Thank you.

Production build 0.71.5 2024