Fix the issues reported by phpcs

Created on 12 July 2024, 4 months ago

Running :-

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig web/modules/contrib/custom_help/

FILE: /var/www/html/d10/web/modules/contrib/custom_help/custom_help.module
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
 24 | ERROR | The array declaration extends to column 292 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/custom_help.routing.yml
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  8 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access administration pages" which is about
    |         | viewing but not changing configurations.
 15 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access administration pages" which is about
    |         | viewing but not changing configurations.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/src/CustomHelpInterface.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityChangedInterface.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/src/CustomHelpListBuilder.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Datetime\DateFormatterInterface.
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/src/CustomHelpTypeListBuilder.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 22 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/src/CustomHelpAccessControlHandler.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------
 29 | ERROR | The array declaration extends to column 115 (the limit is 80). The array content should be split up over multiple lines
 50 | ERROR | The array declaration extends to column 130 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/src/Form/CustomHelpForm.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------
 21 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
 22 | ERROR | The array declaration extends to column 102 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/custom_help/src/CustomHelpStorage.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeInterface.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------


📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India hetal.solanki

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024