Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Jun 2016 at 09:37 UTC
Updated:
22 Jun 2016 at 10:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pushpinderchauhan commentedRemoved the optional word but still doubt about "Defaults to False" because there is no default value set for this variable.
Comment #3
joachim commentedThanks for the patch!
'Defaults to False' should be removed too. That only makes sense for an optional variable.
Comment #4
lluvigneHi!
Acording to @joachim on #3, remove 'Defaults to False' text.
Comment #5
jhodgdonThis seems slightly incomplete, and leaves me wondering about what happens if it is FALSE.
What if we said something like:
TRUE to throw an exception if the plugin ID is invalid; FALSE to return NULL in this case.
I guess that somewhat overlaps with the @return, but at least it doesn't leave you wondering what happens if it's FALSE. Thoughts?
Comment #6
joachim commentedHow about:
If TRUE, an invalid plugin ID will cause an exception to be thrown, instead of returning NULL.
Comment #7
jhodgdonThe grammar in that suggestion in #6 is a bit questionable -- the two clauses don't have parallel verb tenses: "will cause" vs. "returning". It's also kind of passive voice.
Here are some alternatives, which all at least have parallel grammatical constructions:
- TRUE to throw an exception if the plugin ID is invalid; FALSE to return NULL in this case.
- If TRUE, an invalid plugin ID will cause an exception to be thrown; if FALSE, NULL will be returned.
- Determines what happens if the plugin ID is invalid. TRUE will cause an exception to be thrown; FALSE will cause NULL to be returned.
- Determines what happens if the plugin ID is invalid. If TRUE, an exception will be thrown; if FALSE, NULL will be returned.
Looking at these, I think "cause" is kind of awkward, so let's avoid those alternatives? Other than that, pick one of the above, or come up with another alternative that also has parallel verb grammar. OK?
Comment #8
nesta_ commentedfix #4 to #7 :)
Comment #10
nesta_ commentedSorry. attach valid patch and interdiff
Comment #11
nesta_ commentedSorry, bad files Ew!
Comment #13
rajeshwari10 commentedApplying Patch.
Thanks!!
Comment #15
rajeshwari10 commentedSorry for wrong patch applied.
Comment #16
nesta_ commented:) #4 with #7
Comment #17
rajeshwari10 commented#15 is write patch and # 13 is wrong patch.
Thanks!!
Comment #18
jhodgdon#16 is the wrong patch, because it has a line that is too long.
#15 looks fine to me.
To avoid the wrong patch being tested/committed, I am uploading the #15 patch again and hiding all the other patches.
Thanks!
Comment #19
alexpottCommitted 68cc3af and pushed to 8.1.x and 8.2.x. Thanks!