Drupal Coding Standards Issues | phpcs

Created on 29 December 2022, over 1 year ago
Updated 21 January 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/httpswww/httpswww.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /app/modules/contrib/httpswww/src/EventSubscriber/HttpsWwwRedirectSubscriber.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
18 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
40 | ERROR | [x] Expected 1 spaces after parameter type; 6 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/httpswww/src/Form/HttpsWwwSettingsForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------------
12 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
40 | WARNING | [ ] Do not pass empty strings to t()
60 | WARNING | [ ] Do not pass empty strings to t()
78 | WARNING | [ ] Do not pass empty strings to t()
81 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
82 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
83 | ERROR | [x] Array closing indentation error, expected 8 spaces but found 6
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

Time: 917ms; 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/httpswww/

Proposed resolution

Above error/warnings need to be fixed

🐛 Bug report
Status

Fixed

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.69.0 2024