Drupal Coding Standards Issues | phpcs

Created on 17 January 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings

FILE: /var/www/html/modules/contrib/nobots/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 115 characters
7 | WARNING | Line exceeds 80 characters; contains 94 characters
----------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/nobots/nobots.module
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
11 | ERROR | [x] Function comment short description must start with exactly one space
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/nobots/src/EventSubscriber/FinishResponseSubscriber.php
-------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------
52 | ERROR | [x] Expected 1 blank line after function; 2 found
55 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------

Time: 619ms; Memory: 6MB

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

Proposed resolution

Above error/warnings need to be fixed.

🐛 Bug report
Status

RTBC

Version

1.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.

  • Status changed to RTBC over 1 year ago
Production build 0.71.5 2024