Coding Standard issues

Created on 25 September 2024, about 2 months ago

Problem/Motivation

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

FILE: .../web/modules/custom/node_read_time/node_read_time.module
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\Display\EntityViewDisplayInterface.
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/node_read_time/README.md
------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------
7 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
38 | WARNING | [ ] Line exceeds 80 characters; contains 165 characters
39 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
39 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------

FILE: .../web/modules/custom/node_read_time/src/Form/ReadingTimeConfigForm.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/node_read_time/src/Calculate/ReadingTime.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface.
177 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

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

Merge Requests

Comments & Activities

  • Issue created by @alyaj2a
  • Merge request !30Coding Standard Issues - #3476876 ā†’ (Open) created by alyaj2a
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @alyaj2a,

    Thank you for providing an MR. I applied MR!30, it was applied smoothly and fixed all the phpcs issues.

    āžœ  node_read_time git:(8.x-1.x) curl https://git.drupalcode.org/project/node_read_time/-/merge_requests/30.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  3829    0  3829    0     0   8139      0 --:--:-- --:--:-- --:--:--  8146
    patching file README.md
    patching file node_read_time.module
    patching file src/Calculate/ReadingTime.php
    patching file src/Form/ReadingTimeConfigForm.php
    āžœ  node_read_time git:(8.x-1.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml node_read_time
    āžœ  contrib git:(main) āœ—

    Thank you.

Production build 0.71.5 2024