
Found few error/warning when checked with codesniffer for Drupal standards.
FILE: ...ktop/drupal-8-5-demo2/modules/contrib/user_plus/user_plus.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
10 | WARNING | [x] Unused use statement
37 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...modules/user_commerce_grade/user_commerce_grade.links.action.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...user_plus/modules/user_commerce_grade/user_commerce_grade.module
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
30 | ERROR | [x] Namespaced classes/interfaces/traits should be
| | referenced with use statements
47 | WARNING | [x] A comma should follow the last multiline array
| | item. Found: ]
54 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/modules/user_commerce_grade/user_commerce_grade.links.menu.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/user_commerce_grade/src/UserCommerceGradeHtmlRouteProvider.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
23 | WARNING | [x] There must be no blank line following an inline
| | comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 197ms; Memory: 8Mb
Comment | File | Size | Author |
---|---|---|---|
#2 | coding-standard-2974094-2.patch | 3.74 KB | gaurav_drupal |
Comments
Comment #2
gaurav_drupalHi @john.lee
Attached the patch for it. Please review.
Comment #3
gaurav_drupalComment #4
john.nie CreditAttribution: john.nie commentedFixed, you are right. but your patch not apply success.