Fix coding standards
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3311377. -->
Reported by: [jcnventura](https://www.drupal.org/user/122464)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>FILE: draggable_dashboard/src/DashboardHtmlRouteProvider.php<br>
---------------------------------------------------------------------------------------------------------------------<br>
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES<br>
---------------------------------------------------------------------------------------------------------------------<br>
5 | WARNING | [x] Unused use statement<br>
8 | WARNING | [x] Unused use statement<br>
11 | ERROR | [x] Doc comment short description must end with a full stop<br>
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name<br>
---------------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
---------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Plugin/Block/DraggableBlockDeriver.php<br>
-----------------------------------------------------------------------------------------<br>
FOUND 1 ERROR AFFECTING 1 LINE<br>
-----------------------------------------------------------------------------------------<br>
34 | ERROR | [x] Each PHP statement must be on a line by itself<br>
-----------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
-----------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Plugin/Block/DraggableBlock.php<br>
-----------------------------------------------------------------------------------------------------------------<br>
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 10 LINES<br>
-----------------------------------------------------------------------------------------------------------------<br>
17 | WARNING | [x] Unused use statement<br>
60 | ERROR | [ ] Missing short description in doc comment<br>
61 | ERROR | [x] Data types in @var tags need to be fully namespaced<br>
65 | ERROR | [ ] Missing short description in doc comment<br>
66 | ERROR | [x] Data types in @var tags need to be fully namespaced<br>
85 | ERROR | [ ] Doc comment for parameter $theme_manager does not match actual variable name $current_user<br>
127 | ERROR | [ ] Description for the @return value is missing<br>
176 | WARNING | [x] A comma should follow the last multiline array item. Found: ]<br>
182 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"<br>
210 | WARNING | [x] A comma should follow the last multiline array item. Found: 'draggable_dashboard/draggable'<br>
-----------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
-----------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/DashboardListBuilder.php<br>
---------------------------------------------------------------------------------------------------------------------<br>
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES<br>
---------------------------------------------------------------------------------------------------------------------<br>
9 | ERROR | [x] Doc comment short description must end with a full stop<br>
12 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name<br>
---------------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
---------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Controller/DraggableDashboardController.php<br>
----------------------------------------------------------------------------------------------<br>
FOUND 4 ERRORS AND 3 WARNINGS AFFECTING 6 LINES<br>
----------------------------------------------------------------------------------------------<br>
13 | WARNING | [x] Unused use statement<br>
15 | WARNING | [x] Unused use statement<br>
16 | WARNING | [x] Unused use statement<br>
44 | ERROR | [ ] Parameter $plugin_form_manager is not described in comment<br>
49 | ERROR | [ ] Missing parameter comment<br>
68 | ERROR | [ ] Parameter $dashboard_entity is not described in comment<br>
68 | ERROR | [ ] Parameter $region is not described in comment<br>
----------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
----------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Form/DashboardDeleteForm.php<br>
-------------------------------------------------------------------------------<br>
FOUND 1 ERROR AFFECTING 1 LINE<br>
-------------------------------------------------------------------------------<br>
15 | ERROR | Missing short description in doc comment<br>
-------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Form/DashboardBlockFormBase.php<br>
----------------------------------------------------------------------------------------------------------------------<br>
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES<br>
----------------------------------------------------------------------------------------------------------------------<br>
15 | ERROR | [x] Doc comment short description must end with a full stop<br>
18 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name<br>
81 | ERROR | [ ] Missing short description in doc comment<br>
82 | ERROR | [ ] Missing parameter comment<br>
83 | ERROR | [ ] Missing parameter comment<br>
85 | ERROR | [ ] Description for the @return value is missing<br>
155 | ERROR | [x] Data types in @var tags need to be fully namespaced<br>
160 | ERROR | [ ] Missing short description in doc comment<br>
161 | ERROR | [ ] Missing parameter comment<br>
162 | ERROR | [ ] Missing parameter comment<br>
----------------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
----------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Form/DashboardDeleteBlockForm.php<br>
---------------------------------------------------------------------------------------------------------------------<br>
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES<br>
---------------------------------------------------------------------------------------------------------------------<br>
11 | ERROR | [x] Doc comment short description must end with a full stop<br>
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name<br>
72 | ERROR | [ ] Missing short description in doc comment<br>
82 | ERROR | [ ] Description for the @return value is missing<br>
97 | ERROR | [ ] Missing short description in doc comment<br>
98 | ERROR | [ ] Missing parameter comment<br>
99 | ERROR | [ ] Missing parameter comment<br>
---------------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
---------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Form/DashboardConfigureBlockForm.php<br>
---------------------------------------------------------------------------------------------------------------------<br>
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES<br>
---------------------------------------------------------------------------------------------------------------------<br>
9 | ERROR | [x] Doc comment short description must end with a full stop<br>
12 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name<br>
20 | ERROR | [ ] Class property $block_id should use lowerCamel naming without underscores<br>
44 | ERROR | [x] Expected newline after closing brace<br>
---------------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
---------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Form/DashboardForm.php<br>
------------------------------------------------------------------------------------------------------------------------------------<br>
FOUND 8 ERRORS AND 1 WARNING AFFECTING 8 LINES<br>
------------------------------------------------------------------------------------------------------------------------------------<br>
15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name<br>
45 | ERROR | Missing parameter comment<br>
46 | ERROR | Missing parameter comment<br>
48 | ERROR | Description for the @return value is missing<br>
50 | ERROR | Type hint "array" missing for $a<br>
50 | ERROR | Type hint "array" missing for $b<br>
76 | ERROR | The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple<br>
| | lines<br>
168 | ERROR | The array declaration extends to column 133 (the limit is 80). The array content should be split up over multiple<br>
| | lines<br>
249 | ERROR | The array declaration extends to column 137 (the limit is 80). The array content should be split up over multiple<br>
| | lines<br>
------------------------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/src/Form/DashboardAssignBlockForm.php<br>
---------------------------------------------------------------------------------------------------------------------<br>
FOUND 13 ERRORS AND 1 WARNING AFFECTING 12 LINES<br>
---------------------------------------------------------------------------------------------------------------------<br>
9 | ERROR | [x] Doc comment short description must end with a full stop<br>
12 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name<br>
51 | ERROR | [ ] Description for the @return value is missing<br>
52 | ERROR | [x] Separate the @return and @throws sections by a blank line.<br>
76 | ERROR | [ ] Missing short description in doc comment<br>
77 | ERROR | [ ] Missing parameter comment<br>
77 | ERROR | [ ] Missing parameter type<br>
78 | ERROR | [ ] Missing parameter comment<br>
78 | ERROR | [ ] Missing parameter type<br>
79 | ERROR | [ ] Missing parameter comment<br>
81 | ERROR | [ ] Description for the @return value is missing<br>
94 | ERROR | [ ] Missing short description in doc comment<br>
95 | ERROR | [ ] Missing parameter comment<br>
96 | ERROR | [ ] Missing parameter comment<br>
---------------------------------------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
---------------------------------------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/draggable_dashboard.post_update.php<br>
--------------------------------------------------------------------------------------<br>
FOUND 4 ERRORS AFFECTING 4 LINES<br>
--------------------------------------------------------------------------------------<br>
1 | ERROR | [x] Missing file doc comment<br>
3 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;<br>
7 | ERROR | [x] Expected 1 blank line before function; 0 found<br>
55 | ERROR | [x] Space found before comma in argument list<br>
--------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
--------------------------------------------------------------------------------------</p>
<p>FILE: draggable_dashboard/draggable_dashboard.module<br>
----------------------------------------------------------------------------------------<br>
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE<br>
----------------------------------------------------------------------------------------<br>
49 | WARNING | [x] A comma should follow the last multiline array item. Found: 'block'<br>
----------------------------------------------------------------------------------------<br>
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY<br>
----------------------------------------------------------------------------------------</p>
<p>Time: 190ms; Memory: 10MB</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Run drupalcs</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Run drupalcbf to fix all the automated fixes</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue
GitLab AI Context
Project: project/draggable_dashboard
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/draggable_dashboard/-/raw/8.x-1.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/draggable_dashboard
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD