Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I've done a DCS check on the module file and found a few coding standard issue.
Proposed resolution
Fix issues
Remaining tasks
Create a patch file to address issues
User interface changes
none
API changes
none
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#9 | webform-coding_standards-2843307-8-D7.patch | 1.98 KB | Liam Morland |
#7 | dcs_in_module-2843307-7-D7.patch | 48.82 KB | darrenwh |
|
Comments
Comment #2
darrenwh CreditAttribution: darrenwh commentedMade a start on file, up to line circa 3500
Comment #4
Liam MorlandIt appears to be making some changes which shouldn't happen:
Should be
@return int
.Comment #5
darrenwh CreditAttribution: darrenwh commented$return int was there already? the code has jus been indented...
Comment #6
Liam MorlandIt should have been
@return
all along.Comment #7
darrenwh CreditAttribution: darrenwh commentedOK rectified that and reverted some sections where formater broke some lines
Comment #9
Liam MorlandI made a big coding standards commit. Will you be continuing with this?
I did not make the changes in the attached patch. Removing those calls to t() might mess up how some people are doing translation. If we were to make these changes, it would be in a separate issue because these go beyond coding standards.
Comment #10
darrenwh CreditAttribution: darrenwh commentedIn the function specification for t() https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7.x it clearly says You should never use t() to translate variables, so I'm happy to leave this change out if a new ticket can be raised off the back of it. Will checkout latest verson of the module file and finish it off in the next few days, thanks
Comment #11
Liam MorlandOK, I have already committed the first batch, so please make child tickets for follow-ups. Thanks very much for your work on this.