API page: http://api.drupal.org/api/drupal/modules--field--field.api.php/function/...
Describe the problem you have found:
Field widget form elements should be based on the passed in $element...
Probably should be:
Field widget form elements should be based on the given $element...
Otherwise the first parse is "Form elements for field widgets should be based on the (missing word: data? array? kittycat?) which is passed in the $element argument...".
Comment | File | Size | Author |
---|---|---|---|
#9 | hook_field_widget_punctuation_error-1066118-8.patch | 11.02 KB | Barrett |
#7 | hook_field_widget_punctuation_error-1066118.patch | 11.7 KB | Barrett |
Comments
Comment #1
jhodgdonUm. I'm not seeing a documentation problem here, except that technically passed-in should have a hyphen in the middle of it. Can you explain why you think the current wording is a problem? We often use parameter variable names in docblocks, as it's clearer than trying to guess which parameter something is referring to, in my opinion at least.
Comment #2
robertb-1 CreditAttribution: robertb-1 commentedWell, either "given" or "passed-in" is fine. I come from Java, where "given" is used all over the place. Adding a hyphen would resolve the problem. When I read the sentence initially, I assumed "in" introduced a prepositional phrase, with $element as its argument. That clearly didn't allow the sentence to parse, so I had to back-track until I found the syntax error ("passed in" should be "passed-in"). One little hyphen prevents an entire cloud of question marks above one's head :)
Comment #3
jhodgdonok, then we just need a hyphen and everyone will be happy. Good project in patch making for a novice contributor to Drupal...
Comment #4
bfroehle CreditAttribution: bfroehle commentedJust FYI: "passed in" is used all over in Drupal
Comment #5
jhodgdonThey should all have hyphens. The rule is that if you put 2 or more words together to form an adjective, they need to be hyphenated, and all of those examples are like that.
Comment #6
Barrett CreditAttribution: Barrett commentedComment #7
Barrett CreditAttribution: Barrett commentedComment #8
jhodgdonMost of these are good, but a few exceptions:
a) The capitalization should not have been changed here:
See http://drupal.org/node/1354#lists
Also I think in this case that "passed into" is fine? This sentence is saying what happens, as in "This is passed into another function".
b)
This one is not a compound being used as an adjective -- "passed" is a verb here. No hyphen. There are several other places in this patch that have the same problem.
Comment #9
Barrett CreditAttribution: Barrett commentedDo you hear a weird, cackling noise? That's my eighth-grade English teacher mocking me for not having paid more attention to her.
I think I have it corrected now.
Comment #10
jhodgdonThat looks better. Thanks! Should be committed to 8.x and 7.x.
Comment #11
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x.