Problem/Motivation
Command : vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/contrib/nginx/
FILE: /var/www/html/drupal-contri-d10/modules/contrib/nginx/src/Form/Settings.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Ajax\AjaxResponse.
25 | 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
79 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/nginx/src/Service/NginxSite.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 6 WARNINGS AFFECTING 9 LINES
---------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
10 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
35 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
36 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
36 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
36 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
101 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
112 | WARNING | [ ] Unused variable $key.
119 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
142 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/nginx/src/Service/NginxConf.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
43 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/nginx/src/Hook/Theme.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
7 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal-contri-d10/modules/contrib/nginx/nginx.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------
Time: 131ms; Memory: 10MB
Steps to reproduce
Run PHPCS on Config Pages module.
Proposed resolution
Fixed the coding standards.
Remaining tasks
Submit the patch either MR.