Drupal Coding Standards Issues | phpcs

Created on 1 March 2023, over 1 year ago

Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/autotitle/autotitle.module
---------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 5 WARNINGS AFFECTING 14 LINES
---------------------------------------------------------------------------------------------------
  14 | ERROR   | [x] There must be one blank line after the last USE statement; 2 found;
  20 | ERROR   | [x] Expected 1 blank line before function; 2 found
  57 | ERROR   | [ ] Missing parameter comment
  57 | ERROR   | [ ] Missing parameter type
  58 | ERROR   | [ ] Missing parameter comment
  59 | ERROR   | [ ] Missing parameter comment
  59 | ERROR   | [ ] Missing parameter type
 100 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 101 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 114 | WARNING | [x] A comma should follow the last multiline array item. Found: 'H6'
 120 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 124 | ERROR   | [x] Expected 1 space after "="; 2 found
 134 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 153 | ERROR   | [ ] Missing parameter type
 156 | ERROR   | [x] Parameter comment must end with a full stop
 214 | ERROR   | [x] Expected 1 space after "="; 2 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/autotitle/src/AutotitleEntityFormManager.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
 14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
---------------------------------------------------------------------------------------------------------------------

Time: 106ms; Memory: 10MB

Steps to reproduce

Run the following command: phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /drupal/modules/contrib/autotitle

Proposed resolution

Fix all the PHP coding standard issues and warnings

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sahil.goyal

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

Comments & Activities

Production build 0.69.0 2024