Problem/Motivation
Getting following error/warnings:
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\css\style.css
------------------------------------------------------------------------------------------------
FOUND 75 ERRORS AFFECTING 44 LINES
------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
1 | ERROR | [x] Multiple selectors should each be on a single line
1 | ERROR | [x] Multiple selectors should each be on a single line
1 | ERROR | [x] Multiple selectors should each be on a single line
1 | ERROR | [x] Multiple selectors should each be on a single line
1 | ERROR | [x] Multiple selectors should each be on a single line
5 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
15 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
18 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
19 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
20 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
27 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
33 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
33 | ERROR | [x] CSS colours must be defined in lowercase; expected #9d9d9d but found #9D9D9D
43 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
45 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
45 | ERROR | [x] CSS colours must be defined in lowercase; expected #7f8487 but found #7F8487
55 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
59 | ERROR | [x] CSS colours must be defined in lowercase; expected #3c4048 but found #3C4048
69 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
80 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
81 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
81 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
83 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
84 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
88 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
89 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
89 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
89 | ERROR | [x] Selectors must be on a single line
90 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
90 | ERROR | [x] Selectors must be on a single line
91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
91 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
91 | ERROR | [x] Selectors must be on a single line
92 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
92 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
92 | ERROR | [x] Selectors must be on a single line
93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
93 | ERROR | [x] Selectors must be on a single line
94 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
94 | ERROR | [x] Selectors must be on a single line
95 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
95 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
95 | ERROR | [x] Selectors must be on a single line
96 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
96 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
96 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
96 | ERROR | [ ] Style definitions must end with a semicolon
96 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
97 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
98 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
98 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
99 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
99 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
100 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
100 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
102 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
107 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
112 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
117 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
122 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
127 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
132 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
137 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
142 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
147 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
152 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
157 | ERROR | [x] Blank lines are not allowed in class definitions
157 | ERROR | [x] Whitespace found at end of line
167 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
171 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 74 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\README.md
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
62 | ERROR | [x] Expected 1 newline at end of file; 3 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\src\Controller\WeatherForecastController.php
-------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 4 WARNINGS AFFECTING 12 LINES
-------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
13 | ERROR | [x] Missing class doc comment
13 | ERROR | [x] Expected 1 space before opening brace; found 2
17 | ERROR | [x] Expected 1 blank line before function; 0 found
19 | ERROR | [x] Expected 1 space before "?"; 0 found
21 | ERROR | [x] Expected 1 space after "="; 0 found
21 | ERROR | [x] Concat operator must be surrounded by a single space
21 | ERROR | [x] Concat operator must be surrounded by a single space
24 | ERROR | [x] Expected one space after the comma, 0 found
24 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "True"
31 | ERROR | [x] Whitespace found at end of line
35 | ERROR | [x] Expected 1 newline at end of file; 0 found
35 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\src\Form\WeatherWaveForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 37 ERRORS AND 5 WARNINGS AFFECTING 32 LINES
---------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
12 | ERROR | [x] Function comment short description must start with exactly one space
12 | ERROR | [x] Doc comment short description must end with a full stop
13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
13 | ERROR | [x] There must be exactly one newline after the Class comment
15 | ERROR | [x] PHP keywords must be lowercase; expected "class" but found "Class"
19 | ERROR | [x] Expected 1 blank line before function; 0 found
20 | ERROR | [x] Opening brace should be on the same line as the declaration
21 | ERROR | [x] Language constructs must be followed by a single space; expected "return [" but found "return["
24 | ERROR | [x] Expected 1 blank line after function; 0 found
28 | ERROR | [x] Expected 1 space before opening brace; found 0
31 | ERROR | [x] Whitespace found at end of line
32 | ERROR | [x] Expected 1 blank line after function; 0 found
34 | ERROR | [x] Whitespace found at end of line
35 | ERROR | [x] Whitespace found at end of line
36 | ERROR | [x] Expected 1 space before opening brace; found 0
37 | ERROR | [x] Whitespace found at end of line
39 | ERROR | [x] Expected 1 space before "?"; 0 found
40 | ERROR | [x] Expected 1 space before "?"; 0 found
59 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "False"
59 | ERROR | [x] Comments may not appear after statements
66 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
66 | ERROR | [x] Comments may not appear after statements
71 | ERROR | [x] Whitespace found at end of line
73 | ERROR | [x] Expected 1 blank line after function; 0 found
77 | ERROR | [x] Expected 1 space before opening brace; found 0
79 | ERROR | [x] Expected 1 space before ":"; 0 found
84 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 9
84 | ERROR | [x] Expected one space after the comma, 0 found
85 | ERROR | [x] Expected one space after the comma, 0 found
87 | ERROR | [x] Expected 1 blank line after function; 0 found
91 | ERROR | [ ] Method name "WeatherWaveForm::weather_wave_reset_form_submit" is not in lowerCamel format
91 | ERROR | [x] Visibility must be declared on method "weather_wave_reset_form_submit"
91 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
92 | WARNING | [x] There must be no blank line following an inline comment
97 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
97 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 4
97 | ERROR | [x] Expected one space after the comma, 0 found
99 | ERROR | [x] Expected 1 newline at end of file; 0 found
99 | ERROR | [x] The closing brace for the Class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 39 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\src\Plugin\Block\WeatherWaveBlock.php
-------------------------------------------------------------------------------------------------------
FOUND 29 ERRORS AND 6 WARNINGS AFFECTING 24 LINES
-------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
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
7 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
9 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
10 | WARNING | [x] Unused use statement
10 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
11 | WARNING | [x] Unused use statement
11 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
13 | WARNING | [x] Unused use statement
13 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
14 | WARNING | [x] Unused use statement
14 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
15 | WARNING | [x] Unused use statement
15 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
16 | ERROR | [x] Whitespace found at end of line
19 | ERROR | [x] Whitespace found at end of line
26 | ERROR | [x] Expected 1 space before opening brace; found 0
46 | ERROR | [x] There must be no blank lines after the function comment
49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
50 | ERROR | [x] Whitespace found at end of line
57 | ERROR | [x] Concat operator must be surrounded by a single space
57 | ERROR | [x] Concat operator must be surrounded by a single space
59 | ERROR | [x] Expected one space after the comma, 0 found
59 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "True"
62 | ERROR | [x] Expected 1 space after "="; 2 found
63 | ERROR | [x] Short array syntax must be used to define arrays
65 | ERROR | [x] Expected 1 space after "="; 2 found
66 | ERROR | [x] Whitespace found at end of line
67 | ERROR | [x] Whitespace found at end of line
68 | ERROR | [x] Expected 1 newline at end of file; 0 found
68 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 35 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\weather_wave.info.yml
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\weather_wave.libraries.yml
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
10 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\weather_wave.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: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\weather_wave.module
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 9 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | ERROR | [x] There must be no blank lines after the function comment
12 | ERROR | [x] Expected 1 space before opening brace; found 0
13 | ERROR | [x] Language constructs must be followed by a single space; expected "return [" but found "return["
20 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 4
24 | ERROR | [x] Expected 1 blank line after function; 0 found
24 | ERROR | [x] Whitespace found at end of line
26 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
28 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
35 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\weather_wave.permissions.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: D:\xampp\htdocs\drupal_10\web\modules\contrib\weather_wave\weather_wave.routing.yml
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------
Steps to reproduce
Run following command:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml weather_wave/
Proposed resolution
Above error/warnings need to be fixed.