Fix the issues reported by phpcs

Created on 27 March 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/rules_flag/rules_flag.module
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------
30 | ERROR | The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
43 | ERROR | The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/rules_flag/rules_flag.info.yml
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------
8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
10 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-----------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/rules_flag/src/Plugin/RulesAction/FrindFlaggingDelete.php
---------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
34 | ERROR | [x] Expected 1 space after "="; 0 found
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/rules_flag/src/Plugin/Condition/FlagHasId.php
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
29 | ERROR | [x] Additional blank lines found at end of doc comment
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/rules_flag/src/Plugin/Condition/EntityIsFlagged.php
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
35 | ERROR | [x] Additional blank lines found at end of doc comment
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

Time: 3.86 secs; Memory: 6MB

Steps to reproduce

Run following command

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

Proposed resolution

Above error/warnings need to be fixed.

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

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

Comments & Activities

Production build 0.71.5 2024