Fix the issues reported by PHP_CodeSniffer

Created on 23 November 2023, about 1 year ago

Problem/Motivation

As it is recommended to code and follow drupal coding standard i run phpcs command against this module

Steps to reproduce

- PHPCS command i ran ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/ppf/

- Also run auto fix for auto fix issues using ./vendor/bin/phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/ppf/

- Some error still remainings in readme file
FILE: /opt/lampp/htdocs/develop/web/modules/contrib/ppf/README.md
----------------------------------------------------------------------
FOUND 1 ERROR AND 6 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
9 | WARNING | Line exceeds 80 characters; contains 93 characters
18 | WARNING | Line exceeds 80 characters; contains 101 characters
22 | WARNING | Line exceeds 80 characters; contains 127 characters
24 | WARNING | Line exceeds 80 characters; contains 86 characters
26 | WARNING | Line exceeds 80 characters; contains 102 characters
69 | WARNING | Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------

FILE: /opt/lampp/htdocs/develop/web/modules/contrib/ppf/blueprints/theme/directory/README.md
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------
7 | WARNING | Line exceeds 80 characters; contains 96 characters
9 | WARNING | Line exceeds 80 characters; contains 97 characters
13 | WARNING | Line exceeds 80 characters; contains 115 characters
17 | WARNING | Line exceeds 80 characters; contains 92 characters
--------------------------------------------------------------------------------------------

Proposed resolution

- Reduce length of each line to 80 or configure you editor phpstorm to show where to break line correctly

Remaining tasks

Fixing reamining issues flagged by phpcs.

Thank you.

Note: in this module source you also pushed .idea folder it will be good to remove it.

📌 Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

🇲🇼Malawi chancenyasulu

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024