Fix phpcs reported issues

Created on 9 November 2023, 8 months ago
Updated 10 November 2023, 8 months ago
FILE: /var/www/docroot/modules/custom/better_social_sharing_buttons/better_social_sharing_buttons.module
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 19 | ERROR | [ ] Function better_social_sharing_buttons_theme() does not have parameter type hint nor @param annotation for its parameter $existing.
 19 | ERROR | [ ] Function better_social_sharing_buttons_theme() does not have parameter type hint nor @param annotation for its parameter $type.
 19 | ERROR | [ ] Function better_social_sharing_buttons_theme() does not have parameter type hint nor @param annotation for its parameter $theme.
 19 | ERROR | [ ] Function better_social_sharing_buttons_theme() does not have parameter type hint nor @param annotation for its parameter $path.
 19 | ERROR | [ ] Function better_social_sharing_buttons_theme() does not have return type hint nor @return annotation for its return value.
 31 | ERROR | [ ] Function better_social_sharing_buttons_entity_extra_field_info() does not have return type hint nor @return annotation for its return value.
 52 | ERROR | [ ] Function better_social_sharing_buttons_node_view() does not have parameter type hint nor @param annotation for its parameter $view_mode.
 52 | ERROR | [ ] Function better_social_sharing_buttons_node_view() does not have @param annotation for its traversable parameter $build.
 52 | ERROR | [x] Function better_social_sharing_buttons_node_view() does not have void return type hint.
 86 | ERROR | [ ] Function better_social_sharing_buttons_preprocess_better_social_sharing_buttons() does not have parameter type hint nor @param annotation for its parameter $variables.
 86 | ERROR | [x] Function better_social_sharing_buttons_preprocess_better_social_sharing_buttons() does not have void return type hint.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/better_social_sharing_buttons/better_social_sharing_buttons.install
-------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------
  11 | ERROR | [x] Function better_social_sharing_buttons_update_8001() does not have void return type hint.
  44 | ERROR | [x] Function better_social_sharing_buttons_update_8002() does not have void return type hint.
  53 | ERROR | [x] Function better_social_sharing_buttons_update_8003() does not have void return type hint.
  62 | ERROR | [x] Function better_social_sharing_buttons_update_8004() does not have void return type hint.
  87 | ERROR | [x] Function better_social_sharing_buttons_update_8005() does not have void return type hint.
 107 | ERROR | [x] Function better_social_sharing_buttons_update_8006() does not have void return type hint.
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/better_social_sharing_buttons/better_social_sharing_buttons.post_update.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 11 | ERROR | Function better_social_sharing_buttons_post_update_update_layout_builder_more_settings() does not have return type hint nor @return annotation for its return value.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/better_social_sharing_buttons/src/Plugin/Block/SocialSharingButtonsBlock.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 28 | ERROR | [x] Property \Drupal\better_social_sharing_buttons\Plugin\Block\SocialSharingButtonsBlock::$requestStack does not have native type hint for its value but it should be possible to add it based on @var
    |       |     annotation "\Symfony\Component\HttpFoundation\RequestStack".
 35 | ERROR | [x] Property \Drupal\better_social_sharing_buttons\Plugin\Block\SocialSharingButtonsBlock::$titleResolver does not have native type hint for its value but it should be possible to add it based on @var
    |       |     annotation "\Drupal\Core\Controller\TitleResolverInterface".
 42 | ERROR | [x] Property \Drupal\better_social_sharing_buttons\Plugin\Block\SocialSharingButtonsBlock::$configFactory does not have native type hint for its value but it should be possible to add it based on @var
    |       |     annotation "\Drupal\Core\Config\ConfigFactoryInterface".
 49 | ERROR | [x] Property \Drupal\better_social_sharing_buttons\Plugin\Block\SocialSharingButtonsBlock::$routeMatch does not have native type hint for its value but it should be possible to add it based on @var
    |       |     annotation "\Drupal\Core\Routing\RouteMatchInterface".
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
πŸ“Œ Task
Status

Fixed

Version

4.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.69.0 2024