Coding standards and best practices

Created on 9 December 2022, almost 2 years ago
Updated 16 August 2024, 3 months ago

Hi, While reviewing the module for best practices and standards. I have found this with the help of PHPCS and fixed it:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml redirect_message/

FILE: /var/www/html/dContri/redirect_message/redirect_message.module
-------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------
 24 | ERROR | [ ] Missing parameter type
 27 | ERROR | [x] Data types in @return tags need to be fully namespaced
-------------------------------------------------------------------------


FILE: /var/www/html/dContri/redirect_message/redirect_message.install
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
 9 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
   |         | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
   |         | hook_foo_BAR_ID_bar() for block templates."
-----------------------------------------------------------------------------------------------------------------------------------------------

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India akshay.singh Noida

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024