Fix the issues reported by PHPCS

Created on 12 April 2023, over 1 year ago
Updated 8 July 2024, 5 months ago

Problem/Motivation

FILE: ...l/contribution/drupal10/web/modules/contrib/ui_styles_paragraphs/ReadMe.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
10 | WARNING | Line exceeds 80 characters; contains 108 characters
--------------------------------------------------------------------------------

FILE: ...rib/ui_styles_paragraphs/src/Plugin/paragraphs/Behavior/UIStyleOptions.php
--------------------------------------------------------------------------------
FOUND 22 ERRORS AND 1 WARNING AFFECTING 17 LINES
--------------------------------------------------------------------------------
30 | ERROR | [x] The open comment tag must be the only content on the line
30 | ERROR | [ ] Missing short description in doc comment
30 | ERROR | [x] Expected "\Drupal\ui_styles\StylePluginManagerInterface"
| | but found "\Drupal\ui_styles\StylePluginManagerInterface "
| | for @var tag in member variable comment
31 | ERROR | [ ] Class property $ui_styles_manager should use lowerCamel
| | naming without underscores
45 | ERROR | [ ] Missing short description in doc comment
46 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter comment
47 | ERROR | [ ] Missing parameter type
48 | ERROR | [ ] Missing parameter comment
48 | ERROR | [ ] Missing parameter type
49 | ERROR | [ ] Missing parameter comment
50 | ERROR | [ ] Missing parameter comment
51 | ERROR | [ ] Missing parameter comment
53 | ERROR | [x] Expected 1 space between type hint and argument
| | "$configuration"; 23 found
53 | ERROR | [x] Multi-line function declarations must define one parameter
| | per line
53 | ERROR | [x] Multi-line function declarations must define one parameter
| | per line
55 | ERROR | [x] Expected 1 space between type hint and argument
| | "$ui_styles_manager"; 10 found
56 | ERROR | [x] Expected 1 space between type hint and argument
| | "$transliteration"; 4 found
62 | ERROR | [x] Missing function doc comment
121 | WARNING | [ ] Unused variable $key.
256 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2
| | spaces
257 | ERROR | [x] Separate the @param and @return sections by a blank line.
258 | ERROR | [x] Return comment indentation must be 3 spaces, found 2
| | spaces
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 412ms; Memory: 10MB

Steps to reproduce

Execute the command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig ui_styles_paragraphs/

Proposed resolution

Fix all the issues reported for Drupal and DrupalPractice coding standards

Remaining tasks

Patch Review

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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