Running shows the following errors/warnings, which should be fixed, when they are not false positive nor they suggest wrong changes.
FILE: ./default_paragraphs/default_paragraphs.module
-------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
7 | ERROR | [x] When importing a class with "use", do not include a leading \
14 | ERROR | [x] There must be no space before the colon in a CASE statement
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------
FILE: ./default_paragraphs/src/Plugin/Field/FieldWidget/DefaultParagraphsWidget.php
-------------------------------------------------------------------------
FOUND 8 ERRORS AND 5 WARNINGS AFFECTING 12 LINES
-------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\Core\Field\FieldItemListInterface.
57 | ERROR | [ ] Parameter $token_service is not described in comment
74 | ERROR | [x] Doc comment parameter name "$token_service." must not end with a dot
206 | ERROR | [x] Expected one space after the comma, 2 found
206 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
207 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
245 | ERROR | [x] Use null coalesce operator instead of ternary operator.
253 | ERROR | [x] Use null coalesce operator instead of ternary operator.
268 | ERROR | [x] Use null coalesce operator instead of ternary operator.
286 | WARNING | [ ] Unused variable $key.
293 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
295 | WARNING | [x] A comma should follow the last multiline array item. Found: $cardinality
361 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------
Time: 186ms; Memory: 12MB
Issue fork default_paragraphs-3203024
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
sahana _n commentedPlease review the patch.
Comment #3
sahana _n commentedComment #4
suresh prabhu parkala commentedFound some more phpcs errors and solved them. Here is the updated patch.
Comment #5
dharti patel commentedComment #6
dharti patel commentedHello,
Reviewed the #4 patch and after applying the patch still below issues are remaining.
Resolved the issue and create a new patch.
Please review the patch.
Thanks!
Comment #7
avpadernoThose changes aren't related to the report shown in the issue summary, like other changes present in the last patch.
Comment #8
priyanka_chauhan31 commentedHi, I'm working on it .
Comment #9
priyanka_chauhan31 commentedHi, I have created a patch . Please review it .
Comment #10
avpadernoThe report shown in the issue summary is for PHP files, not .css files.
Comment #11
priyanka_chauhan31 commentedHi, I have excluded the css files from this patch. Please review it.
Comment #12
avpadernoEither that trait is used, and the
usestatement is necessary, or that trait is not used and theusestatement is not necessary.Comment #13
priyanka_chauhan31 commentedUse statement has been removed. Please review this new patch.
Comment #14
avpadernoThe patch fixes what reported.
Comment #19
avpadernoComment #22
Nikolay PenchevTested and verified , ready for merge .
Comment #23
avpadernoThe person who provided the patch/MR cannot change the status to Reviewed & tested by the community.
Comment #24
avpadernoComment #25
nikolabintev commentedI tested the issue fork locally. It seems like all issues are fixed.
Comment #26
nikolabintev commentedComment #28
nikolabintev commented