Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
18 Feb 2011 at 19:11 UTC
Updated:
29 Jul 2014 at 19:22 UTC
Jump to comment: Most recent, Most recent file
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 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 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 commentedComment #7
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 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 commentedCommitted to 7.x and 8.x.