Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/login_switch/src/Form/LoginSwitchSettingsForm.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 8 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [ ] Missing short description in doc comment
18 | ERROR | [x] Expected "\Drupal\Core\ProxyClass\Routing\RouteBuilder" but found "\Drupal\Core\ProxyClass\Routing\RouteBuilder." for @var tag in member variable comment
76 | ERROR | [x] Comma not allowed after last value in single-line array declaration
76 | ERROR | [x] Expected one space after the comma, 0 found
80 | ERROR | [ ] The array declaration extends to column 81 (the limit is 80). The array content should be split up over multiple lines
80 | ERROR | [x] Comma not allowed after last value in single-line array declaration
80 | ERROR | [x] Expected one space after the comma, 0 found
81 | ERROR | [ ] The array declaration extends to column 126 (the limit is 80). The array content should be split up over multiple lines
81 | ERROR | [x] Comma not allowed after last value in single-line array declaration
81 | ERROR | [x] Expected one space after the comma, 0 found
86 | ERROR | [x] Comma not allowed after last value in single-line array declaration
86 | ERROR | [x] Expected one space after the comma, 0 found
98 | ERROR | [x] Comma not allowed after last value in single-line array declaration
98 | ERROR | [x] Expected one space after the comma, 0 found
99 | ERROR | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up over multiple lines
99 | ERROR | [x] Comma not allowed after last value in single-line array declaration
99 | ERROR | [x] Expected one space after the comma, 0 found
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/login_switch/src/Routing/LoginSwitchRouteSubscriber.php
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
14 | ERROR | Missing member variable doc comment
-------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/login_switch/src/Routing/ExceptionEventSubscriber.php
--------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
12 | ERROR | [x] Missing class doc comment
12 | ERROR | [x] Expected 1 space before opening brace; found 2
14 | ERROR | [ ] Missing member variable doc comment
26 | ERROR | [ ] Missing parameter comment
27 | ERROR | [ ] Missing parameter comment
39 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
43 | ERROR | [x] Missing function doc comment
43 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
44 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/login_switch/src/EventSubscriber/AddNoIndexHeader.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 46 ERRORS AND 1 WARNING AFFECTING 33 LINES
------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
11 | ERROR | [x] Missing class doc comment
13 | ERROR | [ ] Missing member variable doc comment
31 | ERROR | [x] Expected 1 blank line after function; 2 found
35 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
35 | ERROR | [x] Doc comment short description must end with a full stop
36 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
37 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
37 | ERROR | [ ] Missing parameter comment
37 | ERROR | [x] Data types in @param tags need to be fully namespaced
38 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
40 | ERROR | [x] Opening brace should be on the same line as the declaration
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
42 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 5
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
45 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
47 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
49 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
50 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
51 | ERROR | [x] Array indentation error, expected 5 spaces but found 7
52 | ERROR | [x] Array indentation error, expected 5 spaces but found 7
53 | ERROR | [x] Array indentation error, expected 5 spaces but found 7
54 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 5
56 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
56 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
57 | ERROR | [x] Expected 1 space after IF keyword; 0 found
58 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
59 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
59 | ERROR | [x] Expected 1 space after IF keyword; 0 found
60 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 9
60 | ERROR | [x] Expected 1 space after IF keyword; 0 found
61 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 11
62 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 9
63 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
64 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
65 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
65 | ERROR | [x] Closing brace indented incorrectly; expected 1 spaces, found 3
65 | ERROR | [x] Expected 1 blank line after function; 0 found
66 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
66 | ERROR | [x] The closing brace for the class must have an empty line before it
66 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 1
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 44 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
Time: 4.95 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/login_switch/
Proposed resolution
Above error/warnings need to be fixed.