Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/d8_recaptcha_v3/config/install/d8_recaptcha_v3.settings.yml
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/d8_recaptcha_v3/d8_recaptcha_v3.libraries.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: /var/www/html/modules/contrib/d8_recaptcha_v3/d8_recaptcha_v3.module
----------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------
27 | ERROR | [x] Missing function doc comment
33 | WARNING | [x] A comma should follow the last multiline array item. Found: )
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/d8_recaptcha_v3/d8_recaptcha_v3.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: /var/www/html/modules/contrib/d8_recaptcha_v3/d8_recaptcha_v3.routing.yml
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/d8_recaptcha_v3/src/Form/SettingsForm.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 52 ERRORS AND 3 WARNINGS AFFECTING 42 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] Whitespace found at end of line
2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
2 | ERROR | [x] Whitespace found at end of line
3 | ERROR | [x] Whitespace found at end of line
4 | ERROR | [x] Whitespace found at end of line
5 | ERROR | [x] Whitespace found at end of line
6 | ERROR | [x] There must be one blank line after the namespace declaration
6 | ERROR | [x] Whitespace found at end of line
7 | ERROR | [x] Whitespace found at end of line
8 | ERROR | [x] Whitespace found at end of line
10 | ERROR | [x] Missing class doc comment
10 | ERROR | [x] Whitespace found at end of line
11 | ERROR | [x] Whitespace found at end of line
12 | ERROR | [x] Missing function doc comment
12 | ERROR | [x] Whitespace found at end of line
13 | ERROR | [x] Whitespace found at end of line
14 | ERROR | [x] Whitespace found at end of line
15 | ERROR | [x] Whitespace found at end of line
16 | ERROR | [x] Whitespace found at end of line
17 | ERROR | [x] Whitespace found at end of line
18 | ERROR | [x] Missing function doc comment
18 | ERROR | [x] Whitespace found at end of line
19 | ERROR | [x] Whitespace found at end of line
20 | ERROR | [x] Whitespace found at end of line
22 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] Whitespace found at end of line
24 | ERROR | [x] Whitespace found at end of line
25 | ERROR | [x] Whitespace found at end of line
26 | ERROR | [x] Whitespace found at end of line
31 | ERROR | [x] Whitespace found at end of line
32 | ERROR | [x] Whitespace found at end of line
33 | ERROR | [x] Whitespace found at end of line
38 | ERROR | [x] Whitespace found at end of line
39 | ERROR | [x] Whitespace found at end of line
42 | ERROR | [x] Whitespace found at end of line
45 | ERROR | [x] Whitespace found at end of line
49 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
50 | ERROR | [ ] The array declaration extends to column 104 (the limit is 80). The array content should be split up over multiple lines
50 | WARNING | [ ] #options values usually have to run through t() for translation
50 | ERROR | [x] Expected one space after the comma, 0 found
50 | WARNING | [ ] #options values usually have to run through t() for translation
50 | ERROR | [x] Expected one space after the comma, 0 found
52 | ERROR | [x] Whitespace found at end of line
53 | ERROR | [x] Whitespace found at end of line
54 | ERROR | [x] Whitespace found at end of line
56 | ERROR | [x] Missing function doc comment
56 | ERROR | [x] Whitespace found at end of line
57 | ERROR | [x] Whitespace found at end of line
59 | ERROR | [x] Whitespace found at end of line
60 | ERROR | [x] Whitespace found at end of line
64 | ERROR | [x] Whitespace found at end of line
65 | ERROR | [x] Whitespace found at end of line
66 | ERROR | [x] Expected 1 newline at end of file; 0 found
66 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 51 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/d8_recaptcha_v3/src/Controller/customRCController.php
-------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 2 WARNINGS AFFECTING 13 LINES
-------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
10 | ERROR | [ ] Class name must begin with a capital letter
10 | ERROR | [x] Missing class doc comment
12 | ERROR | [x] Missing function doc comment
13 | ERROR | [x] Whitespace found at end of line
15 | ERROR | [x] Whitespace found at end of line
16 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
17 | ERROR | [x] Expected 1 space after "="; 2 found
17 | ERROR | [x] Concat operator must be surrounded by a single space
18 | ERROR | [x] Whitespace found at end of line
20 | ERROR | [x] Whitespace found at end of line
21 | ERROR | [x] Expected one space after the comma, 0 found
21 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
22 | ERROR | [x] Whitespace found at end of line
25 | ERROR | [x] There should be no white space after an opening "("
25 | ERROR | [x] There should be no white space before a closing ")"
27 | ERROR | [x] Expected 1 newline at end of file; 0 found
27 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
Time: 1.16 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/d8_recaptcha_v3/
Proposed resolution
Above error/warnings need to be fixed.