Closed (won't fix)
Project:
Coder
Version:
7.x-2.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2012 at 22:33 UTC
Updated:
10 Oct 2016 at 11:47 UTC
Jump to comment: Most recent
Comments
Comment #1
klausiWe don't have an exception for t() in the coding standards, and I think that is alright. Consider this (unfortunately drupal.org breaks that line for us, but imagine this is one long line):
versus
Comment #2
cameron tod commentedI was working on #1533208: Make contextual module pass Coder Review, and jhodgdon stated that if drupalcs flags up this warning on arrays declared in function calls, then it is inconsistent with the coding standards. This issue is ongoing regarding this: #1539712: [policy, no patch] Coding standards for breaking function calls and language constructs across lines
FWIW, I much prefer the second style and have changed a lot of my code over to that standard now.
Comment #3
traviscarden commentedThe Coding standards only state this with respect to arrays:
Since no exceptions are specified, the sniffer is actually enforcing the the standard correctly as it's written. #1539712: [policy, no patch] Coding standards for breaking function calls and language constructs across lines is about defining exceptions. Until there's resolution there and the standards themselves are updated, any change to the sniffer would have to be based on speculation. It's probably best to wait.
Comment #4
klausiDrupalcs has been merged into coder, moving this issue.
Comment #5
klausiCoder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.