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.
Add @return
type and @param
values in the comment docblocks.
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff-2609044-8-11.txt | 1012 bytes | rakesh.gectcr |
#11 | 2609044-11.patch | 1.44 KB | rakesh.gectcr |
#8 | interdiff-2609044-5-8.txt | 765 bytes | heykarthikwithu |
#8 | 2609044-8.patch | 1.27 KB | heykarthikwithu |
#5 | interdiff-2609044-2-5.patch | 924 bytes | heykarthikwithu |
Comments
Comment #2
heykarthikwithuAdded a patch for this.
Comment #3
joachim CreditAttribution: joachim commentedThat's a good start, but could you possibly add a description to each of those too?
(And thanks -- I always like documentation patches! :)
Comment #4
heykarthikwithuComment #5
heykarthikwithuAdded the description.
Comment #6
joachim CreditAttribution: joachim commentedNearly there... :)
We typically don't write 'you' in docs. Typically, you'd write something like "Specifies whether retweets should be included in the results."
And I should have noticed this earlier -- optional parameters say '(optional)' at the front of the description.
Also this doesn't look like a boolean... NULL??? So we should say what the values ought to be.
So:
> (optional) TRUE to have retweets are included in the results; NULL to exclude them. Defaults to TRUE.
You can just say 'An array of tweets' here. If you happen to be familiar with the array structure, it would be great to add that here -- eg, what are they keyed by, is each value in the array a string, or an array of data? -- but if not, it's ok like this. It's already an improvement :)
Comment #7
heykarthikwithuworking on this.
Comment #8
heykarthikwithuAdded the changes.
Comment #9
heykarthikwithuComment #10
joachim CreditAttribution: joachim commentedThanks for the updated patch. Needs a bit more work though:
Doc lines need to wrap to 80 chars.
This needs the same treatment as the other param: rewrite to remove 2nd person, '(optional)', specify the value if it's not a proper TRUE/FALSE, and the default.
Comment #11
rakesh.gectcrComment #12
rakesh.gectcrComment #13
joachim CreditAttribution: joachim commentedThat sounds very weird!!!
Is that really what it does? If so, that's a whole other bug. The default value should be one of the values you're expected to pass!