Drupal Coding Standards Issues | phpcs

Created on 29 November 2022, about 2 years ago
Updated 27 January 2023, almost 2 years ago

Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/block_content_revision_ui/LICENSE.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
323 | WARNING | Line exceeds 80 characters; contains 83 characters
----------------------------------------------------------------------

FILE: /app/modules/contrib/block_content_revision_ui/README.md
------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------
10 | WARNING | [ ] Line exceeds 80 characters; contains 239 characters
12 | WARNING | [ ] Line exceeds 80 characters; contains 232 characters
14 | WARNING | [ ] Line exceeds 80 characters; contains 203 characters
38 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

FILE: /app/modules/contrib/block_content_revision_ui/block_content_revision_ui.module
-----------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------------------
26 | ERROR | [x] Use null coalesce operator instead of ternary operator.
69 | WARNING | [x] A comma should follow the last multiline array item. Found: ' history'
83 | ERROR | [x] Language constructs must be followed by a single space; expected 1 space but found "\n"
85 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
86 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
87 | ERROR | [x] Array closing indentation error, expected 8 spaces but found 6
88 | ERROR | [x] Object operator not indented correctly; expected 10 spaces but found 8
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

Time: 1.47 secs; Memory: 10MB

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/block_content_revision_ui

Proposed resolution

Above error need to be fixed

🐛 Bug report
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024