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.

Command icon 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

Jay Jangid created an issue. See original summary.

jay jangid’s picture

Assigned: jay jangid » Unassigned
Status: Active » Needs review

Created MR , please review.

Thank you.

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya

Reviewed the MR!2 above issue fixed remaining the some other phpcs issues

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
binnythomas’s picture

Can you add the patch please?

ashutosh ahirwal’s picture

Category: Task » Bug report
Issue tags: +Coding standards
StatusFileSize
new7.84 KB

Providing new patch with all the fixing of phpcs issue.

binnythomas’s picture

Status: Needs review » Fixed

Applied the patch. Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.