Problem/Motivation
Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .
FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/static_server/src/Form/StaticServerConfigForm.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 13 WARNINGS AFFECTING 26 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] There must be one blank line after the namespace declaration
14 | ERROR | [x] Expected 1 blank line before function; 0 found
15 | ERROR | [x] Short array syntax must be used to define arrays
35 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
36 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
38 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
39 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
41 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
42 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
44 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
45 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
48 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
48 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
48 | ERROR | [x] Short array syntax must be used to define arrays
49 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
49 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
50 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
51 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
52 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
54 | ERROR | [x] Short array syntax must be used to define arrays
55 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
60 | ERROR | [x] Short array syntax must be used to define arrays
61 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
66 | ERROR | [x] Short array syntax must be used to define arrays
67 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
84 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
89 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
89 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
90 | ERROR | [x] Expected 1 blank line after function; 0 found
91 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/static_server/static_server.routing.yml
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------
FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/static_server/static_server.info.yml
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------
1 | WARNING | [ ] Remove "version" from the info file, it will be added by drupal.org packaging automatically
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------
FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/static_server/static_server.links.menu.yml
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/static_server/static_server.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
8 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
9 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
17 | ERROR | [x] Short array syntax must be used to define arrays
18 | ERROR | [x] Short array syntax must be used to define arrays
35 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml . inside module folder.
Proposed resolution
Fix the issues, create a patch and git it reviewed.
Remaining tasks
User interface changes
API changes
Data model changes