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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

urvashi_vora created an issue. See original summary.

kenyoowen’s picture

StatusFileSize
new338.58 KB
new135.84 KB

Hi urvashi_vora

I applied the patch coding-standard-fixes.patch to the “UI Styles Paragraphs” module against Version 1.x-dev and confirmed that the errors and warnings are resolved. Please see the screenshots attached.

For your review.
Thank you.

kenyoowen’s picture

Status: Needs review » Reviewed & tested by the community
sharique’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the patch, the current patch is not applying. Some of the PHPCS issue might be fixed with other issue, please provide updated patch, if some issues are still present.

mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new1.67 KB

Added an updated patch for the remaining phpcs issues, please review it.

Thanks!

anjali mehta’s picture

StatusFileSize
new45.93 KB

Hello @mrinalini9
Tested 3353697-5.patch on Drupal 9.5 and php version 8.1. Patch applied cleanly. But getting a warning and error on running the phpcs. Adding screenshot for Your references. Please have a look.
Thank You .

nisha_j’s picture

StatusFileSize
new10.46 KB

Hi, patch 3353697-5.patch #5 applied cleanly.
Tested on drupal 10.1 and php version 8.1
Applied patch and ran these commands:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ui_styles_paragraphs/
uploaded screenshot for reference.

silvi.addweb made their first commit to this issue’s fork.

silvi.addweb’s picture

I have tested #5 and raised MR for the same. Please review and merge this MR.

vinmayiswamy’s picture

StatusFileSize
new193.56 KB
new51.08 KB

Hi,

I applied MR!4 to the ui_styles_paragraphs module against version 1.1.x-dev in Drupal 10.2.x and confirmed that the errors and warnings reported by phpcs are resolved. Please see the screenshots attached.

RTBC +1

Thanks!

vinmayiswamy’s picture

Status: Needs review » Reviewed & tested by the community

  • sharique committed 7829bee9 on 1.1.x
    Issue #3353697 by urvashi_vora, sharique: Fix the issues reported by...
sharique’s picture

Status: Reviewed & tested by the community » Fixed

Fixed issue with minor changes.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.