Problem/Motivation
Coding standards issue found in module.
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/burndown.install
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\burndown\Entity\Task.
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/js/burndown.backlog.js
--------------------------------------------------------------------------------------------------------
FOUND 21 ERRORS AFFECTING 18 LINES
--------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
30 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
38 | ERROR | [x] Whitespace found at end of line
57 | ERROR | [x] Whitespace found at end of line
76 | ERROR | [x] Whitespace found at end of line
78 | ERROR | [x] Whitespace found at end of line
79 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
79 | ERROR | [x] Expected 1 space before opening brace; found 0
101 | ERROR | [x] Whitespace found at end of line
103 | ERROR | [x] Whitespace found at end of line
106 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
106 | ERROR | [x] Expected 1 space before opening brace; found 0
172 | ERROR | [x] Whitespace found at end of line
174 | ERROR | [x] Whitespace found at end of line
175 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
175 | ERROR | [x] Expected 1 space before opening brace; found 0
230 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
232 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
233 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
234 | ERROR | [x] Inline control structures are not allowed
239 | ERROR | [x] Inline control structures are not allowed
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 21 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/js/burndown.task_edit.js
----------------------------------------------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 15 LINES
----------------------------------------------------------------------------------------------------------
26 | ERROR | [x] Whitespace found at end of line
27 | ERROR | [x] Whitespace found at end of line
28 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
28 | ERROR | [x] Expected 1 space before opening brace; found 0
107 | ERROR | [x] Whitespace found at end of line
109 | ERROR | [x] Whitespace found at end of line
113 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
113 | ERROR | [x] Expected 1 space before opening brace; found 0
133 | ERROR | [x] Whitespace found at end of line
135 | ERROR | [x] Whitespace found at end of line
141 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
141 | ERROR | [x] Expected 1 space before opening brace; found 0
153 | ERROR | [x] Whitespace found at end of line
155 | ERROR | [x] Whitespace found at end of line
169 | ERROR | [x] Whitespace found at end of line
176 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
176 | ERROR | [x] Expected 1 space before opening brace; found 0
207 | ERROR | [x] Whitespace found at end of line
209 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
209 | ERROR | [x] Expected 1 space before opening brace; found 0
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/js/burndown.board.js
------------------------------------------------------------------------------------------------------
FOUND 37 ERRORS AFFECTING 34 LINES
------------------------------------------------------------------------------------------------------
12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
13 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
14 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
15 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
16 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
25 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
37 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
56 | ERROR | [x] Whitespace found at end of line
81 | ERROR | [x] Whitespace found at end of line
83 | ERROR | [x] Whitespace found at end of line
84 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
84 | ERROR | [x] Expected 1 space before opening brace; found 0
124 | ERROR | [x] Whitespace found at end of line
155 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
157 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
158 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
159 | ERROR | [x] Inline control structures are not allowed
164 | ERROR | [x] Inline control structures are not allowed
184 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
186 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
187 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
192 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
197 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
198 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
199 | ERROR | [x] Whitespace found at end of line
203 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
203 | ERROR | [x] Whitespace found at end of line
204 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
205 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
206 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
207 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
207 | ERROR | [x] Whitespace found at end of line
208 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
212 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
213 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
214 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
215 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 37 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/js/burndown.swimlanes.js
----------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
22 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
58 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
60 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
62 | ERROR | [x] Inline control structures are not allowed
67 | ERROR | [x] Inline control structures are not allowed
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/burndown.module
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
263 | WARNING | [ ] Unused variable $project.
266 | WARNING | [ ] Unused variable $swimlane_name.
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/burndown_project.page.inc
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
24 | WARNING | Unused variable $burndown_project.
-----------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/burndown_swimlane.page.inc
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
24 | WARNING | Unused variable $burndown_swimlane.
------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Entity/Task.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
16 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
920 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
920 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
921 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
921 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
921 | ERROR | [x] Object operator not indented correctly; expected 5 spaces but found 2
996 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
996 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
997 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
997 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
997 | ERROR | [x] Object operator not indented correctly; expected 5 spaces but found 2
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Entity/Project.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Plugin/Field/FieldWidget/BurndownTaskRelationshipDefaultWidget.php
--------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------
83 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Plugin/Field/FieldWidget/BurndownLogDefaultWidget.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------
58 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Plugin/Field/FieldFormatter/BurndownLogDefaultFormatter.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------
91 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
95 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Controller/SprintController.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------
33 | ERROR | Missing short description in doc comment
95 | ERROR | The array declaration extends to column 151 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Controller/BoardController.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
63 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
219 | WARNING | Unused variable $swimlane_id.
--------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Controller/TaskController.php
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------
108 | WARNING | User::load calls should be avoided in classes, use dependency injection instead
150 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
567 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Controller/BacklogController.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface.
------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Commands/BurndownDrushCommands.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 20 ERRORS AND 2 WARNINGS AFFECTING 21 LINES
------------------------------------------------------------------------------------------------------------------------------------------
26 | ERROR | Public method name "BurndownDrushCommands::project_list" is not in lowerCamel format
85 | ERROR | Public method name "BurndownDrushCommands::task_list" is not in lowerCamel format
85 | ERROR | The array declaration extends to column 129 (the limit is 80). The array content should be split up over multiple lines
162 | ERROR | Private method name "BurndownDrushCommands::output_task_row" is not in lowerCamel format
195 | ERROR | Public method name "BurndownDrushCommands::swimlane_list" is not in lowerCamel format
254 | ERROR | Public method name "BurndownDrushCommands::sprint_list" is not in lowerCamel format
333 | ERROR | Public method name "BurndownDrushCommands::task_sprint_assignment" is not in lowerCamel format
488 | ERROR | Public method name "BurndownDrushCommands::task_details" is not in lowerCamel format
562 | ERROR | Public method name "BurndownDrushCommands::add_task" is not in lowerCamel format
688 | ERROR | Public method name "BurndownDrushCommands::edit_task" is not in lowerCamel format
790 | ERROR | Public method name "BurndownDrushCommands::close_task" is not in lowerCamel format
839 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
858 | ERROR | Public method name "BurndownDrushCommands::reopen_task" is not in lowerCamel format
902 | ERROR | Public method name "BurndownDrushCommands::change_swimlane" is not in lowerCamel format
966 | ERROR | Public method name "BurndownDrushCommands::watch_task" is not in lowerCamel format
999 | ERROR | Public method name "BurndownDrushCommands::unwatch_task" is not in lowerCamel format
1030 | ERROR | Public method name "BurndownDrushCommands::send_to_board" is not in lowerCamel format
1078 | ERROR | Public method name "BurndownDrushCommands::send_to_backlog" is not in lowerCamel format
1127 | ERROR | Public method name "BurndownDrushCommands::add_project" is not in lowerCamel format
1157 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
1218 | ERROR | Public method name "BurndownDrushCommands::edit_project" is not in lowerCamel format
1296 | ERROR | Public method name "BurndownDrushCommands::search_tasks" is not in lowerCamel format
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Event/TaskWorkEvent.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\EventDispatcher\Event.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Event/TaskCommentEvent.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\EventDispatcher\Event.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Event/TaskClosedEvent.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\EventDispatcher\Event.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Event/TaskChangedEvent.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\EventDispatcher\Event.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/burndown/src/Event/TaskCreatedEvent.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\EventDispatcher\Event.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
Time: 2.93 secs; Memory: 24MB
Steps to reproduce
use the below command with arguments.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/burndown
Proposed resolution
Fix the phpcs issue found.