Fix phpcs reported issues

Created on 17 October 2023, about 1 year ago
FILE: /var/www/docroot/modules/custom/node_access_rebuild_progressive/node_access_rebuild_progressive.drush.inc
-------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------
 11 | ERROR | [ ] Function node_access_rebuild_progressive_drush_command() does not have return type hint nor @return annotation for its return value.
 23 | ERROR | [x] Function drush_node_access_rebuild_progressive_rebuild() does not have void return type hint.
-------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/node_access_rebuild_progressive/node_access_rebuild_progressive.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 13 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Consolidation\SiteAlias\SiteAliasManager.
  15 | ERROR | [x] Function node_access_rebuild_progressive_cron() does not have void return type hint.
  34 | ERROR | [ ] Function node_access_rebuild_progressive_trigger() does not have return type hint nor @return annotation for its return value.
  58 | ERROR | [x] Function node_access_rebuild_progressive_set_default() does not have void return type hint.
  67 | ERROR | [ ] Function node_access_rebuild_progressive_process_cron() does not have return type hint nor @return annotation for its return value.
  77 | ERROR | [ ] @return annotation of function node_access_rebuild_progressive_process_chunk() does not specify type hint for items of its traversable return value.
  82 | ERROR | [x] Function node_access_rebuild_progressive_process_chunk() does not have native return type hint for its return value but it should be possible to add it based on @return annotation "array".
 115 | ERROR | [x] Function node_access_rebuild_progressive_finished() does not have void return type hint.
 123 | ERROR | [ ] Missing parameter comment
 125 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "_drush_node_access_rebuild_progressive_rebuild" but expected "node_access_rebuild_progressive__drush_node_access_rebuild_progressive_rebuild"
 125 | ERROR | [x] Function _drush_node_access_rebuild_progressive_rebuild() does not have void return type hint.
 125 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
 154 | ERROR | [ ] Doc comment for parameter $processed does not match actual variable name <undefined>
 157 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "_drush_node_access_rebuild_progressive_process" but expected "node_access_rebuild_progressive__drush_node_access_rebuild_progressive_process"
 157 | ERROR | [x] Function _drush_node_access_rebuild_progressive_process() does not have void return type hint.
 179 | ERROR | [ ] Function node_access_rebuild_progressive_form_node_configure_rebuild_confirm_alter() does not have parameter type hint nor @param annotation for its parameter $form.
 179 | ERROR | [x] Function node_access_rebuild_progressive_form_node_configure_rebuild_confirm_alter() does not have void return type hint.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/node_access_rebuild_progressive/src/Form/NodeAccessRebuildProgressiveSettingsForm.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
 66 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/node_access_rebuild_progressive/src/Commands/NodeAccessRebuildProgressiveCommands.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 22 | ERROR | [x] Method \Drupal\node_access_rebuild_progressive\Commands\NodeAccessRebuildProgressiveCommands::accessRebuildProgressive() does not have void return type hint.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States shelane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024