Problem/Motivation
The module must follow the correct Drupal coding standards. So, when developing it, make sure to run phpcs --standard=Drupal,DrupalPractice on the project. This will fix most issues that reviewers might find.
Steps to reproduce
Run the following command:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml {module_path e.g /web/custom/module.}
FILE: /Users/mac/contribution/username/css/username.style.css
------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------
1 | ERROR | [x] Selectors must be on a single line
45 | ERROR | [x] CSS colours must be defined in lowercase; expected #b3cefb but found #B3CEFB
64 | ERROR | [x] CSS colours must be defined in lowercase; expected #d9e7fd but found #D9E7FD
139 | ERROR | [x] CSS colours must be defined in lowercase; expected #d9e7fd but found #D9E7FD
188 | ERROR | [x] CSS colours must be defined in lowercase; expected #b3cefb but found #B3CEFB
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
7 | WARNING | Line exceeds 80 characters; contains 85 characters
13 | WARNING | Line exceeds 80 characters; contains 120 characters
25 | WARNING | Line exceeds 80 characters; contains 103 characters
----------------------------------------------------------------------
FILE: /Users/mac/contribution/username/username.module
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AND 15 WARNINGS AFFECTING 43 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
18 | WARNING | [x] Unused use statement
19 | WARNING | [x] Unused use statement
24 | WARNING | [x] Unused use statement
27 | ERROR | [x] Doc comment short description must end with a full stop
120 | ERROR | [x] Case breaking statements must be followed by a single blank line
123 | ERROR | [x] Case breaking statements must be followed by a single blank line
279 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
279 | ERROR | [x] Expected one space after the comma, 2 found
497 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
856 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
889 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
939 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
941 | ERROR | [ ] @return doc comment specified, but function has no return statement
942 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
964 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
977 | WARNING | [ ] Only string literals should be passed to t() where possible
999 | WARNING | [ ] Only string literals should be passed to t() where possible
1024 | WARNING | [ ] Only string literals should be passed to t() where possible
1033 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
1035 | ERROR | [ ] @return doc comment specified, but function has no return statement
1036 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
1050 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1058 | ERROR | [x] Expected 1 space before "="; 0 found
1063 | WARNING | [ ] Only string literals should be passed to t() where possible
1073 | WARNING | [ ] Only string literals should be passed to t() where possible
1081 | WARNING | [ ] Only string literals should be passed to t() where possible
1090 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
1092 | ERROR | [ ] @return doc comment specified, but function has no return statement
1093 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
1116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1129 | WARNING | [ ] Only string literals should be passed to t() where possible
1144 | WARNING | [ ] Only string literals should be passed to t() where possible
1144 | ERROR | [ ] The array declaration extends to column 118 (the limit is 80). The array content should be split up over multiple lines
1158 | WARNING | [ ] Only string literals should be passed to t() where possible
1174 | WARNING | [ ] Only string literals should be passed to t() where possible
1174 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up over multiple lines
1188 | WARNING | [ ] Only string literals should be passed to t() where possible
1204 | WARNING | [ ] Only string literals should be passed to t() where possible
1213 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
1215 | ERROR | [ ] @return doc comment specified, but function has no return statement
1216 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
1274 | ERROR | [x] Case breaking statements must be followed by a single blank line
1277 | ERROR | [x] Case breaking statements must be followed by a single blank line
1280 | ERROR | [x] Case breaking statements must be followed by a single blank line
1283 | ERROR | [x] Case breaking statements must be followed by a single blank line
1286 | ERROR | [x] Case breaking statements must be followed by a single blank line
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 27 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/username_phone.module
---------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
14 | WARNING | [x] Unused use statement
20 | ERROR | [x] Language constructs must be followed by a single space; expected "return [" but found "return["
82 | ERROR | [x] Expected "bool" but found "boolean" for function return type
141 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
145 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
149 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/src/Form/UsernamePhoneForm.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------
53 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
57 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
61 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
70 | WARNING | [ ] Possible useless method overriding detected
91 | WARNING | [ ] Possible useless method overriding detected
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/src/Plugin/Validation/Constraint/UsernamePhoneUnique.php
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
17 | ERROR | Missing member variable doc comment
----------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/src/Plugin/Validation/Constraint/UsernamePhoneRequiredValidator.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\Validator\Constraint.
21 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
21 | ERROR | [ ] Description for the @return value is missing
43 | WARNING | [ ] Line exceeds 80 characters; contains 99 characters
43 | ERROR | [x] No space found before comment text; expected "// $required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users'));" but found
| | "//$required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users'));"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_displayname/username_displayname.module
-----------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------
15 | WARNING | [ ] Hook implementations should not duplicate @return documentation
16 | ERROR | [x] Return comment indentation must be 3 spaces, found 5 spaces
31 | WARNING | [ ] Hook implementations should not duplicate @return documentation
31 | ERROR | [ ] @return doc comment specified, but function has no return statement
32 | ERROR | [x] Return comment indentation must be 3 spaces, found 5 spaces
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_displayname/username_displayname.install
------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------
10 | ERROR | [x] Missing function doc comment
11 | ERROR | [x] Inline comments must start with a capital letter
20 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
21 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
23 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
28 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Form/UsernameSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
30 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
625 | WARNING | [ ] Line exceeds 80 characters; contains 174 characters
625 | ERROR | [x] No space found before comment text; expected "// $form_state->setErrorByName('restriction', $this->t('To restricts the username field, at least one of
| | uppercase and lowercase letters or numbers must be selected.'));" but found "//$form_state->setErrorByName('restriction', $this->t('To restricts the username
| | field, at least one of uppercase and lowercase letters or numbers must be selected.'));"
710 | ERROR | [x] Expected 1 blank line after function; 0 found
711 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/UsernameGenerator.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 33 ERRORS AND 1 WARNING AFFECTING 33 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
156 | WARNING | [x] There must be no blank line following an inline comment
156 | ERROR | [x] No space found before comment text; expected "// $new_name = username_unique_username($new_name, $account->id());" but found "//$new_name =
| | username_unique_username($new_name, $account->id());"
343 | ERROR | [ ] The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
344 | ERROR | [ ] The array declaration extends to column 113 (the limit is 80). The array content should be split up over multiple lines
345 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
346 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
347 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
348 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
349 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
350 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
351 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
352 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
353 | ERROR | [ ] The array declaration extends to column 95 (the limit is 80). The array content should be split up over multiple lines
354 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
355 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
356 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
357 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
358 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
359 | ERROR | [ ] The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
360 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
361 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
362 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
363 | ERROR | [ ] The array declaration extends to column 88 (the limit is 80). The array content should be split up over multiple lines
364 | ERROR | [ ] The array declaration extends to column 107 (the limit is 80). The array content should be split up over multiple lines
365 | ERROR | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
366 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
367 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
368 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
369 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over multiple lines
370 | ERROR | [ ] The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple lines
371 | ERROR | [ ] The array declaration extends to column 91 (the limit is 80). The array content should be split up over multiple lines
372 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over multiple lines
373 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
374 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Plugin/migrate/process/UsernameReplaceToken.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\migrate\MigrateExecutableInterface.
23 | ERROR | [x] list(...) is forbidden, use [...] instead.
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Controller/UsernameAutocompleteController.php
-----------------------------------------------------------------------------------------------------------------------------------------
โ username git:(1.0.x) โ /Users/mac/project/phpcs/vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /Users/mac/contribution/username
FILE: /Users/mac/contribution/username/css/username.style.css
------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------
1 | ERROR | [x] Selectors must be on a single line
45 | ERROR | [x] CSS colours must be defined in lowercase; expected #b3cefb but found #B3CEFB
64 | ERROR | [x] CSS colours must be defined in lowercase; expected #d9e7fd but found #D9E7FD
139 | ERROR | [x] CSS colours must be defined in lowercase; expected #d9e7fd but found #D9E7FD
188 | ERROR | [x] CSS colours must be defined in lowercase; expected #b3cefb but found #B3CEFB
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/username.module
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AND 15 WARNINGS AFFECTING 43 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
18 | WARNING | [x] Unused use statement
19 | WARNING | [x] Unused use statement
24 | WARNING | [x] Unused use statement
27 | ERROR | [x] Doc comment short description must end with a full stop
120 | ERROR | [x] Case breaking statements must be followed by a single blank line
123 | ERROR | [x] Case breaking statements must be followed by a single blank line
279 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
279 | ERROR | [x] Expected one space after the comma, 2 found
497 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
856 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
889 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
939 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
941 | ERROR | [ ] @return doc comment specified, but function has no return statement
942 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
964 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
977 | WARNING | [ ] Only string literals should be passed to t() where possible
999 | WARNING | [ ] Only string literals should be passed to t() where possible
1024 | WARNING | [ ] Only string literals should be passed to t() where possible
1033 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
1035 | ERROR | [ ] @return doc comment specified, but function has no return statement
1036 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
1050 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1058 | ERROR | [x] Expected 1 space before "="; 0 found
1063 | WARNING | [ ] Only string literals should be passed to t() where possible
1073 | WARNING | [ ] Only string literals should be passed to t() where possible
1081 | WARNING | [ ] Only string literals should be passed to t() where possible
1090 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
1092 | ERROR | [ ] @return doc comment specified, but function has no return statement
1093 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
1116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1129 | WARNING | [ ] Only string literals should be passed to t() where possible
1144 | WARNING | [ ] Only string literals should be passed to t() where possible
1144 | ERROR | [ ] The array declaration extends to column 118 (the limit is 80). The array content should be split up over multiple lines
1158 | WARNING | [ ] Only string literals should be passed to t() where possible
1174 | WARNING | [ ] Only string literals should be passed to t() where possible
1174 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up over multiple lines
1188 | WARNING | [ ] Only string literals should be passed to t() where possible
1204 | WARNING | [ ] Only string literals should be passed to t() where possible
1213 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
1215 | ERROR | [ ] @return doc comment specified, but function has no return statement
1216 | ERROR | [x] Return comment indentation must be 3 spaces, found 4 spaces
1274 | ERROR | [x] Case breaking statements must be followed by a single blank line
1277 | ERROR | [x] Case breaking statements must be followed by a single blank line
1280 | ERROR | [x] Case breaking statements must be followed by a single blank line
1283 | ERROR | [x] Case breaking statements must be followed by a single blank line
1286 | ERROR | [x] Case breaking statements must be followed by a single blank line
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 27 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/username_phone.module
---------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
14 | WARNING | [x] Unused use statement
20 | ERROR | [x] Language constructs must be followed by a single space; expected "return [" but found "return["
82 | ERROR | [x] Expected "bool" but found "boolean" for function return type
141 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
145 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
149 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/src/Form/UsernamePhoneForm.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------
53 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
57 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
61 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
70 | WARNING | [ ] Possible useless method overriding detected
91 | WARNING | [ ] Possible useless method overriding detected
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/src/Plugin/Validation/Constraint/UsernamePhoneUnique.php
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
17 | ERROR | Missing member variable doc comment
----------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_phone/src/Plugin/Validation/Constraint/UsernamePhoneRequiredValidator.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\Validator\Constraint.
21 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
21 | ERROR | [ ] Description for the @return value is missing
43 | WARNING | [ ] Line exceeds 80 characters; contains 99 characters
43 | ERROR | [x] No space found before comment text; expected "// $required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users'));" but found
| | "//$required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users'));"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_displayname/username_displayname.module
-----------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------
15 | WARNING | [ ] Hook implementations should not duplicate @return documentation
16 | ERROR | [x] Return comment indentation must be 3 spaces, found 5 spaces
31 | WARNING | [ ] Hook implementations should not duplicate @return documentation
31 | ERROR | [ ] @return doc comment specified, but function has no return statement
32 | ERROR | [x] Return comment indentation must be 3 spaces, found 5 spaces
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/modules/username_displayname/username_displayname.install
------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------
10 | ERROR | [x] Missing function doc comment
11 | ERROR | [x] Inline comments must start with a capital letter
20 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
21 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
23 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
28 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Form/UsernameSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
30 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
625 | WARNING | [ ] Line exceeds 80 characters; contains 174 characters
625 | ERROR | [x] No space found before comment text; expected "// $form_state->setErrorByName('restriction', $this->t('To restricts the username field, at least one of
| | uppercase and lowercase letters or numbers must be selected.'));" but found "//$form_state->setErrorByName('restriction', $this->t('To restricts the username
| | field, at least one of uppercase and lowercase letters or numbers must be selected.'));"
710 | ERROR | [x] Expected 1 blank line after function; 0 found
711 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/UsernameGenerator.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 33 ERRORS AND 1 WARNING AFFECTING 33 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
156 | WARNING | [x] There must be no blank line following an inline comment
156 | ERROR | [x] No space found before comment text; expected "// $new_name = username_unique_username($new_name, $account->id());" but found "//$new_name =
| | username_unique_username($new_name, $account->id());"
343 | ERROR | [ ] The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
344 | ERROR | [ ] The array declaration extends to column 113 (the limit is 80). The array content should be split up over multiple lines
345 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
346 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
347 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
348 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
349 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
350 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
351 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
352 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
353 | ERROR | [ ] The array declaration extends to column 95 (the limit is 80). The array content should be split up over multiple lines
354 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
355 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
356 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
357 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
358 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
359 | ERROR | [ ] The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
360 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
361 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
362 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
363 | ERROR | [ ] The array declaration extends to column 88 (the limit is 80). The array content should be split up over multiple lines
364 | ERROR | [ ] The array declaration extends to column 107 (the limit is 80). The array content should be split up over multiple lines
365 | ERROR | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
366 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
367 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
368 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
369 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over multiple lines
370 | ERROR | [ ] The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple lines
371 | ERROR | [ ] The array declaration extends to column 91 (the limit is 80). The array content should be split up over multiple lines
372 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over multiple lines
373 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
374 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Plugin/migrate/process/UsernameReplaceToken.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\migrate\MigrateExecutableInterface.
23 | ERROR | [x] list(...) is forbidden, use [...] instead.
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Controller/UsernameAutocompleteController.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\Crypt.
24 | ERROR | [ ] The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
73 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/mac/contribution/username/src/Routing/UsernameRouteSubscriber.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
19 | WARNING | [x] Unused use statement
19 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\username\Form\UsernameRegisterForm.
20 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------
Time: 371ms; Memory: 16MB