- Issue created by @GGH
Running PHPCS shows the warnings/errors listed below, which should be fixed.
FILE: /var/www/html/stringoverrides/src/Form/StringoverridesAdminForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 4 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------------------------------------------------------
10 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
25 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
249 | ERROR | [x] list(...) is forbidden, use [...] instead.
281 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
285 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
287 | ERROR | [ ] Missing parameter type
287 | ERROR | [x] Parameter comment must be on the next line
296 | ERROR | [x] Expected 1 blank line after function; 0 found
297 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/stringoverrides/src/Controllers/GoToDefaultLanguage.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------
11 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/stringoverrides/src/StringOverridesTranslation.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
18 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
26 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------
Time: 229ms; Memory: 6MB
Active
1.8
Code