Problem/Motivation
FILE: .../summary_only/src/Plugin/Field/FieldFormatter/TextSummaryOnlyFormatter.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
68 | ERROR | [x] Whitespace found at end of line
87 | ERROR | [ ] The array declaration extends to column 87 (the limit is
| | 80). The array content should be split up over multiple
| | lines
115 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
142 | ERROR | [x] Expected 1 blank line after function; 0 found
143 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 98ms; Memory: 10MB
Steps to reproduce
Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig summary_only/
Remaining tasks
Patch review
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | issue-fixed.PNG | 28.3 KB | gautam_105@ |
Issue fork summary_only-3373778
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
ashutosh ahirwal commentedProvided patch apply cleanly but still throwing some remaining errors.
Used command:-
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/summary_only
Remaining issues.
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/summary_only/src/Plugin/Field/FieldFormatter/TextSummaryOnlyFormatter.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
85 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------
Time: 92ms; Memory: 10MB
Comment #4
gautam_105@ commented@Ashutosh Ahirwal , @manishsaharan
i have fixed the issue and created MR for the same . Review the changes and se screenshot as well .
Comment #6
clarkssquared commentedHi Gautam_105@
I applied your MR !1 and I confirmed that it fixes all the PHPCS erros, however, I will retain the status to needs review so that others can thoroughly check your MR. RTBC +1 for me.
Comment #9
manishsaharan commentedThank you so much guys for finding and fixing the issue.
Comment #10
manishsaharan commentedThis is working fine, so marking the status to be fixed.
Thanks!