Use "PHP CodeSniffer" to get the formatting issue & update the codebase

please find the report CoderReport.txt

Comments

xaiwant created an issue. See original summary.

patelmayank7552’s picture

StatusFileSize
new9.76 KB

Hi,

I have created the patch to fix the coding standard issue using PHP CodeSniffer.

Thanks

patelmayank7552’s picture

Status: Needs work » Needs review
govind.maloo’s picture

Status: Needs review » Needs work

Unable to apply patch, require more work.

git apply freport_coding_standard_3040527-2.patch 
error: patch failed: freport.info:2
error: freport.info: patch does not apply
govind.maloo’s picture

Status: Needs work » Needs review
StatusFileSize
new10.71 KB
kkalaskar’s picture

StatusFileSize
new10.71 KB

@govindmaloo
I applied the patch on the local instance. and run the following commands, found 2 issues. I fixed it please review once.

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md freport.module

FILE: C:\xampp\htdocs\d7-new\sites\all\modules\contrib\freport\freport.module
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------

Time: 406ms; Memory: 8MB

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md templates/page--admin--reports--freport.tpl.php

FILE: C:\xampp\htdocs\d7-new\sites\all\modules\contrib\freport\templates\page--admin--reports--freport.tpl.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

Time: 287ms; Memory: 6MB

vishakraman’s picture

Assigned: Unassigned » vishakraman
Status: Needs review » Fixed
Issue tags: -Novice +IttbHackathon

Patch Applied, seems working fine!

vishakraman’s picture

Status: Fixed » Closed (fixed)