Closed (fixed)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 May 2015 at 16:25 UTC
Updated:
22 Feb 2018 at 15:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
donquixote commentedI am sure a lot of this could be further improved.
But I think it is a step forward.
Comment #2
megachrizRelated issue (not a duplicate): #2342143: Fix coding standards
I think that descriptions for each
@paramshould be added. For hook implementations there should be no documentation for the parameters and the return value. This should already be documented in the hook documentation. See also "Hook implementation" at https://www.drupal.org/node/1354Comment #3
donquixote commentedWhile I agree, I think this is ok to postpone to a follow-up issue. Making the IDE happy, and documenting the type, is already a huge win imo.
That's a fair point.
For my own modules I still want the @param and @return on these functions, simply because it is nice for my IDE. But I understand why the general consensus / standard for drupal says otherwise.
Comment #4
megachrizClosed #2607300: Add @return type and change @param values in the comment docblocks. as a duplicate which has a patch with more nice docblock improvements.
Comment #5
heykarthikwithuWorking on this.
Comment #6
heykarthikwithuComment #7
megachriz@heykarthikwithu
Can it be that you uploaded the wrong patch? It is the same as in #2607300: Add @return type and change @param values in the comment docblocks..
Comment #8
heykarthikwithu@MegaChriz, yes uploaded patch is the same in #2607300: Add @return type and change @param values in the comment docblocks.
Comment #9
megachrizThis should be kept.
If the only boolean that is returned is 'false', then it is better to document
@return falseinstead of@return bool(at least that is how I've seen it in core, see \Drupal\Component\Utility::strpos()).Made corrections in the attached patch. Note: changes from the patch in #1 not included.
Comment #11
megachrizCommitted #9.
The improvements from #1 are not included. That patch still needs work (see #2).
Comment #12
megachrizThis is a partly reroll of the patch in #1. I left a few things out that were either covered by #2342143: Fix coding standards or by other issues.
Comment #13
megachrizReroll + small modifications.
Comment #15
megachrizCommitted #13.