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.
| Comment | File | Size | Author |
|---|---|---|---|
| coding-standard-fixes.patch | 3.1 KB | urvashi_vora | |
| #2 | 3360695-2.patch | 1.49 KB | kaustab_roy |
| #2 | interdiff_0_2.txt | 1.49 KB | kaustab_roy |
Issue fork reserved_paths-3360695
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3360695-fix-the-issues
changes, plain diff MR !3
Comments
Comment #2
kaustab_roy commentedpatch#0 applied cleanly & it fixes most of the issues reported by phpcs --standard=Drupal,DrupalPractice.
Added patch for function naming error in module file as reported by phpcs.
Remaining one warning as maintainer might need it in future code.
WARNING | Unused variable $fields.
Comment #7
mutasim al-shoura commentedThank you for the patches. It has been merged and some other improvements applied.
Comment #9
mutasim al-shoura commentedComment #10
urvashi_vora commentedHi @Mutasim,
I am curious to know why I haven't been credited for my contribution here, as I actively participated in identifying the issue with your module, creating the necessary ticket, and even providing a patch for its resolution. I was wondering if there is a specific reason for my exclusion from receiving credit.
I would greatly appreciate it if you could provide some clarification on this matter.
Thanks
Comment #11
mutasim al-shoura commentedHi @urvashi_vora
Yes sorry about that it's by mistake, I assure you that I'll credit you and @Kaustab_Roy for your valuable contribution ASAP.
Thank you
Comment #12
urvashi_vora commentedThank You