Fix the issues reported by phpcs

Created on 16 May 2023, about 1 year ago
Updated 17 May 2023, about 1 year ago

Problem/Motivation

FILE: ...ibution/drupal/web/modules/contrib/reserved_paths/src/Form/AdminForm.php
--------------------------------------------------------------------------------
FOUND 16 ERRORS AND 4 WARNINGS AFFECTING 19 LINES
--------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
10 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
14 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
15 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
21 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
22 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
30 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
31 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
32 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
33 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
34 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
40 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
41 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
43 | WARNING | [ ] Unused variable $fields.
60 | ERROR | [x] Missing function doc comment
66 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
66 | WARNING | [ ] Only string literals should be passed to t() where possible
72 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
88 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
89 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...ribution/drupal/web/modules/contrib/reserved_paths/reserved_paths.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
10 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...w/html/contribution/drupal/web/modules/contrib/reserved_paths/README.txt
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
40 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 300ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig reserved_paths/

Proposed resolution

Fix all the errors and warnings

Remaining tasks

"Unused variable $fields." - Left this error because may be the maintainer might need it in future code.

Patch review.

๐Ÿ“Œ Task
Status

Fixed

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