Fix the issues reported by phpcs

Created on 5 July 2024, 5 months ago
Updated 30 July 2024, 4 months ago

Problem/Motivation

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

FILE: /var/www/html/d10/web/modules/contrib/restui/restui.module
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
16 | ERROR | [x] Case breaking statements must be followed by a single blank line
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

FILE: /var/www/html/d10/web/modules/contrib/restui/src/Controller/RestUIController.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\rest\Plugin\Type\ResourcePluginManager.
120 | ERROR | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
120 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
173 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/d10/web/modules/contrib/restui/src/Form/RestUIForm.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
177 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
489 | ERROR | [ ] Missing parameter comment
490 | ERROR | [ ] Missing parameter comment
492 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/d10/web/modules/contrib/restui/restui.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

Time: 438ms; Memory: 12MB

Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

📌 Task
Status

Fixed

Version

1.21

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