Fix the issues reported by phpcs

Created on 11 July 2023, over 1 year ago
Updated 25 October 2023, about 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/article_custom_df/article_date.module
-----------------------------------------------------------------------------------
FOUND 18 ERRORS AND 3 WARNINGS AFFECTING 12 LINES
-----------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | WARNING | [x] Unused use statement
11 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
13 | ERROR | [x] There must be no blank lines after the function comment
15 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
15 | ERROR | [x] Whitespace found at end of line
16 | ERROR | [x] Opening brace should be on the same line as the declaration
16 | ERROR | [x] Opening brace indented incorrectly; expected 1 spaces, found 2
16 | ERROR | [x] Whitespace found at end of line
18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
18 | ERROR | [x] Expected 1 space after closing parenthesis; found 6
18 | ERROR | [x] Whitespace found at end of line
20 | WARNING | [ ] Unused variable $mydate.
20 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
20 | ERROR | [x] Space after closing parenthesis of function call prohibited
20 | ERROR | [x] Space found before semicolon; expected ");" but found ") ;"
21 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
23 | WARNING | [x] A comma should follow the last multiline array item. Found: )
25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
26 | ERROR | [x] Expected 1 newline at end of file; 0 found
26 | ERROR | [x] Closing brace indented incorrectly; expected 1 spaces, found 0
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

Time: 71ms; 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 article_custom_df/

Remaining tasks

Patch review

📌 Task
Status

RTBC

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

Production build 0.71.5 2024