Problem/Motivation
Getting Following errors/warnings
$ phpcs --standard=Drupal simple_affiliate
FILE: ...:\Users\Admin\Desktop\task\simple_affiliate\src\Controller\SetTracking.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
11 | WARNING | [ ] The class short comment should describe what the class does
| | and not simply repeat the class name
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...dmin\Desktop\task\simple_affiliate\src\Plugin\Block\AffiliateLinkBlock.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
35 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | ]
36 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | ]
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 420ms; Memory: 8MB
Proposed resolution
Fix the errors and warnings.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | phpcs-issue-fixes-3339532-7.patch | 7.84 KB | ashutosh ahirwal |
Issue fork simple_affiliate-3339532
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 #3
jay jangid commentedCreated MR , please review.
Thank you.
Comment #4
himanshu_jhaloya commentedReviewed the MR!2 above issue fixed remaining the some other phpcs issues
Comment #5
himanshu_jhaloya commentedComment #6
binnythomas commentedCan you add the patch please?
Comment #7
ashutosh ahirwal commentedProviding new patch with all the fixing of phpcs issue.
Comment #10
binnythomas commentedApplied the patch. Thanks