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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3330069-2.patch | 5.34 KB | samitk |
Comments
Comment #2
samitk commentedError/warnings are fixed.
Comment #4
enzipher commented