Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Nov 2015 at 11:52 UTC
Updated:
16 Feb 2016 at 05:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rashid_786 commentedchanges made as per suggestions.
Comment #3
rashid_786 commentedComment #5
David_Rothstein commentedComment #6
jhodgdonThanks for the issue and patch! It needs some work though:
This is a function. The first line summary should still start with a verb.
(optional) should be lower-case by standard. Then Property should be upper-case, and the line should end in .
Default should be capitalized. And we should be specific here: is it returning a language code or a language object? Or really, if you see the $property parameter, I guess it can return all sorts of things, so this line is not really correct or complete.
Comment #7
priya.chat commentedComment #8
snehi commentedAssigning to myself due to no activity.
Comment #9
snehi commentedAttaching patch as per #6.
@johngdon i think
I think this is correct except default keyword.
Please see this https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/lang...
I may be wrong.
Comment #10
snehi commentedForgot to attach patch and interdiff.
Comment #12
snehi commentedComment #13
joachim commentedWe've lost the fact it's the default we're returning here.
It's pretty tricky to do a first-line for this function, as it has two fairly different return values and we really want to mention both in the first line.
I would put this as:
Returns the default language, as an object, or one of its properties.
That fits in 80 characters.
This needs expanding. Here there's no one-line limit so we can say something like:
Returns either the language object for the default language used on the site, or the property of that object named in the $property parameter.
Comment #14
shreya shetty commentedComment #15
shreya shetty commentedComment #16
walangitan commentedThere were a couple of extra spaces in #15 that I removed and also used the description in #13 to re-include the default that's being returned.
Comment #17
walangitan commentedFixed some more issues with spacing from #16.
Comment #19
snehi commented@Shreya Shetty and @walangitan
Whenever you upload a new patch please upload interdiff.
It is easy for reviewer to see what has been changed since last patch.
Comment #20
snehi commentedplease wrap it to 80 columns please.
Comment #21
joachim commented> + * Returns either the language object for the default language used on the site,
If this is getting rerolled anyway, then remove the 'Returns' from the start of that sentence.
'Returns foo' describes the whole function. The @return line doesn't need to say it.
Comment #22
walangitan commentedRerolled the patch based on comments from 20 & 21.
Comment #23
walangitan commentedComment #24
joachim commentedLooks good to me.
Comment #25
jhodgdonAgreed, thanks!
Comment #26
David_Rothstein commentedCommitted to 7.x - thanks!