Fix the issues reported by phpcs

Created on 5 October 2023, about 1 year ago
Updated 6 February 2024, 9 months ago

Problem/Motivation

FILE: /var/www/html/drupal_module_development/web/modules/contrib/role_watchdog/src/RoleWatchdogListBuilder.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
29 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal_module_development/web/modules/contrib/role_watchdog/src/Form/RoleWatchdogForm.php
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------
19 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
22 | WARNING | [ ] Unused variable $entity.
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal_module_development/web/modules/contrib/role_watchdog/src/Form/RoleWatchdogSettingsForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
10 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
55 | WARNING | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
---------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal_module_development/web/modules/contrib/role_watchdog/src/Entity/RoleWatchdogInterface.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
68 | WARNING | Line exceeds 80 characters; contains 83 characters
--------------------------------------------------------------------------------------------------------------------

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

FILE: /var/www/html/drupal_module_development/web/modules/contrib/role_watchdog/src/RoleWatchdogAccessControlHandler.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Access\AccessResult.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal_module_development/web/modules/contrib/role_watchdog/role_watchdog.module
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 1 WARNING AFFECTING 11 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityInterface.
71 | ERROR | [ ] Missing parameter comment
71 | ERROR | [ ] Missing parameter type
72 | ERROR | [ ] Missing parameter comment
72 | ERROR | [ ] Missing parameter type
73 | ERROR | [ ] Missing parameter comment
73 | ERROR | [ ] Missing parameter type
74 | ERROR | [ ] Missing parameter comment
74 | ERROR | [ ] Missing parameter type
75 | ERROR | [ ] Missing parameter comment
95 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
126 | ERROR | [ ] Missing parameter comment
126 | ERROR | [ ] Missing parameter type
127 | ERROR | [ ] Missing parameter comment
127 | ERROR | [ ] Missing parameter type
128 | ERROR | [ ] Missing parameter comment
128 | ERROR | [ ] Missing parameter type
134 | ERROR | [ ] The array declaration extends to column 212 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Install the role watchdog module and perform PHPCS for Drupal Standards

Proposed resolution

Fix the errors found from PHPCS

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India Akshat26 Bhopal

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