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
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | after-3353697.png | 51.08 KB | vinmayiswamy |
| #11 | before-3353697.png | 193.56 KB | vinmayiswamy |
| #7 | After_applying_patch.png | 10.46 KB | nisha_j |
| #6 | After-patch.png | 45.93 KB | anjali mehta |
| #5 | 3353697-5.patch | 1.67 KB | mrinalini9 |
Issue fork ui_styles_paragraphs-3353697
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
Comment #2
kenyoowen commentedHi 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.
Comment #3
kenyoowen commentedComment #4
sharique commentedThanks 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.
Comment #5
mrinalini9 commentedAdded an updated patch for the remaining phpcs issues, please review it.
Thanks!
Comment #6
anjali mehta commentedHello @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 .
Comment #7
nisha_j commentedHi, 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.
Comment #10
silvi.addweb commentedI have tested #5 and raised MR for the same. Please review and merge this MR.
Comment #11
vinmayiswamy commentedHi,
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!
Comment #12
vinmayiswamy commentedComment #14
sharique commentedFixed issue with minor changes.