Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/widget_type/css/options-filter.css
--------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------
101 | ERROR | [ ] Style definitions must end with a semicolon
174 | ERROR | [x] CSS colours must be defined in lowercase; expected #eeee but found #EEEE
176 | ERROR | [x] CSS colours must be defined in lowercase; expected #ddd but found #DDD
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/widget_type.install
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
150 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/tests/src/Unit/WidgetTypeConfigurationTest.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
35 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/Form/WidgetTypeSettingsForm.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
41 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/WidgetRegistrySourceInterface.php
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
17 | ERROR | Return type "array{0: string, 1: string}" must not contain spaces
-------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/Entity/WidgetType.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------
68 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
229 | ERROR | [x] Expected newline after closing brace
244 | ERROR | [x] Expected newline after closing brace
---------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/Plugin/EntityReferenceSelection/WidgetTypeSelection.php
-----------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
22 | ERROR | [x] Missing function doc comment
24 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
25 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
77 | ERROR | [x] Expected 1 blank line after function; 2 found
80 | ERROR | [x] Missing function doc comment
106 | ERROR | [x] Expected 1 blank line after function; 0 found
107 | ERROR | [x] The closing brace for the class must have an empty line before it
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/Element/WidgetSelectorElement.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------
27 | ERROR | [ ] Missing short description in doc comment
53 | ERROR | [ ] Missing short description in doc comment
77 | ERROR | [x] Expected newline after closing brace
77 | ERROR | [x] Expected 1 space before "|"; 0 found
77 | ERROR | [x] Expected 1 space after "|"; 0 found
111 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
111 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
172 | ERROR | [x] Expected newline after closing brace
172 | ERROR | [x] Expected 1 space before "|"; 0 found
172 | ERROR | [x] Expected 1 space after "|"; 0 found
285 | ERROR | [x] Expected newline after closing brace
285 | ERROR | [x] Expected 1 space before "|"; 0 found
285 | ERROR | [x] Expected 1 space after "|"; 0 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/Controller/InteractiveComponents.php
-------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------
12 | WARNING | [x] Unused use statement
87 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/WidgetTypeInterface.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------
16 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
42 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
144 | ERROR | [ ] Missing short description in doc comment
145 | ERROR | [ ] Missing parameter comment
145 | ERROR | [ ] Missing parameter type
363 | ERROR | [x] Parameter comment must end with a full stop
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/WidgetRegistrySourceListBuilder.php
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------
39 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/widget_type/src/WidgetTypeListBuilder.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------
139 | ERROR | [x] Expected newline after closing brace
183 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
191 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over multiple lines
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
Time: 2.87 secs; Memory: 8MB
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/widget_type/
Proposed resolution
Above error/warnings need to be fixed.