Problem/Motivation
For a variety of reasons, @param
and @return
documentation should include the data type. Although this is mentioned in coding standards, it is not mandated. This issue started with a patch to add data types to all the @param
and @return
lines in the includes/file.inc
file, but it has subsequently morphed into a discussion of the question, "Should all @param
and @return
data types be documented?"
- In favor of the standards change:
- Opposed to the standards change:
- Thinks the standards change is desirable but impractical:
Note that the above was gathered by inference; Feel free to revise if you know differently.
Proposed resolution
The proposed patch adds parameter and return data type documentation to the includes/file.inc
file.
Remaining tasks
- The patch in this issue needs to be reviewed, approved, and committed.
- Similar patches should be generated for the rest of Drupal core.
- The Documenting functions and methods documentation should be rewritten to reflect that:
- Type hinting in
@param
and@return
lines is now required rather than merely allowed. - The
mixed
type-hint is now deprecated and should be replaced with the allowed types separated by the vertical-bar character, asstring|false|null
. - Using
bool
is preferred overboolean
, according to webchick and PEAR. - Likewise,
int
is preferred overinteger
.
- Type hinting in
- A patch should be written to create a D8 version of Coder that warns if such type-hinting is missing or
mixed
.
User interface changes
None.
API changes
None; this is a documentation change only. Adding data types to actual function arguments should be considered in separate issues.
Original issue
Per jhodgdon in #1201024-32: drupal_realpath() should describe when it should be used:
maybe rewrite it as:
@param string $uri
And in #35:
Having data types in @param statements is a relatively new doc standard. There is no real reason why it shouldn't be adopted here, just because it hasn't been adopted everywhere else yet.
Comment | File | Size | Author |
---|---|---|---|
#43 | includes--file_inc-add-type-hint-docs-1290258-43.patch | 34.22 KB | pillarsdotnet |
#1 | data-type-docs-1290258-1.patch | 33.74 KB | pillarsdotnet |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedPatch adds data types to
@param
and@return
docs, ensures a blank line before@return
, and corrects a few other errors that I saw along the way:Comment #2
pillarsdotnet CreditAttribution: pillarsdotnet commentedTagging Novice because this will likely need a few re-rolls as conflicting patches get committed, and re-rolling docs-only patches is tedious but not technically difficult.
Comment #3
jhodgdonWe are planning to wait on patches of this size (that affect everything in a file and would make many patches need rerolls) until the sprint the week of November 1st, after the big patch that will move all the files into core.
Comment #4
pillarsdotnet CreditAttribution: pillarsdotnet commented@jhodgdon
To avoid delay, I could submit a separate patch for each function header. That's more work for both of us, but I'm sure we're all willing to make sacrifices to speed development, right?
Comment #5
jhodgdonThat is not really an improvement to have 50 separate issues (or however many there are) -- it would still make all patches related to file.inc need a reroll.
Please just wait until November. We do plan to have a big "fix up the docs" sprint the first week.
Comment #6
pillarsdotnet CreditAttribution: pillarsdotnet commentedIt would be nice if drupal.org (or groups.drupal.org) featured an event calendar that listed such issue-postponing events, so those of us who are results-oriented can avoid working on issues before their appointed time.
Whoah! An event calendar? On a CMS support website? What a novel concept!
Comment #7
jhodgdonThere is an event calendar on gdo. I just haven't posted this event to it. Planning to post to gdo in the documentation-team group in mid-October.
Comment #8
pillarsdotnet CreditAttribution: pillarsdotnet commentedLink? I searched and didn't find it. Probably used the wrong search terms.
Comment #9
jhodgdonSee #7 "I haven't posted...yet".
Comment #10
pillarsdotnet CreditAttribution: pillarsdotnet commented(sigh) I was asking for a link to the event calendar. Nevermind; I'm sure I can find it eventually.
Comment #11
jhodgdonOh, sorry! Just go to groups.drupal.org and click on "Events" in the top nav. To add an event, go to the group you want to add it to, and add new content of type "Event". :)
Comment #12
pillarsdotnet CreditAttribution: pillarsdotnet commentedGreat. Posted event: Move all core Drupal files into /core folder.
Comment #13
catchWhile I think it'd be great to try to schedule patches like this for that rough period, it'd also be good to get more reviews on this one. For example does api.drupal.org handle this properly?
Comment #14
pillarsdotnet CreditAttribution: pillarsdotnet commented@catch:
Sorry; didn't mean to mislead you. In this case, "postponed" doesn't mean, "Looks good; let's commit it later." The patch has never been in "RTBC" status and is not approved for a pre-scheduled commit. In this case, "postponed" means that Jennifer won't even consider it for review until after November 1st.
However, if someone else (like yourself) wants to start reviewing patches in the documentation component, I certainly won't complain.
I'm fairly sure that api.drupal.org does handle typed parameters. They're mentioned (but not mandated) by Coding Standards, and already used in a fair number of Drupal core functions:
Comment #15
catchSorry I should've clarified more as well.
I think it makes tonnes of sense to try to get patches like this in around the week or two after November 1st - that way the issue queue massacre happens all at once.
However any patch that should go in for that window really needs to be reviewed in advance - since if it starts getting reviewed around November 1st it could end up not being ready until the end of that month, at which point people will already be trying to re-roll patches again.
I think there's a reason (not necessarily a good reason but some kind of reason) why we don't have data types in @params but I can't remember what it is. This is the sort of issue that might be worth cross posting in the coding standards group and or g.d.o/core to get some more reviews.
Comment #16
catchAnd... that doesn't mean the patch needs to be re-rolled, but we should agree the coding standards change or not (or maybe we're just breaking the coding standard everywhere already, I didn't look but this information is missing in the issue ;).
Comment #17
pillarsdotnet CreditAttribution: pillarsdotnet commentedThe relevant part of the current Coding standards says:
In the issue referenced by the summary, Jennifer was suggesting that I change
@param $uri
to@param string $uri
and I balked because the change would be inconsistent with just about every other function in that file.Then I posted this issue mainly to demonstrate that if we're going to start documenting parameter types, we should do it consistently and all at once rather than function-by-function as the mood strikes.
I do agree that if we set this precedent, the Coding Standards should be updated to reflect the policy change.
On the other hand, feel free to close (won't fix) this if you feel that the standard should not change.
Comment #18
catchOK so to me it seems sensible just to document all data types of parameters. We often end up saying int/string/bool in the description anyway and could drop those. But I'd like to see more people chime in on this issue either way.
Comment #19
pillarsdotnet CreditAttribution: pillarsdotnet commentedPosted: Should all @param data types be documented?
Feel free to crosspost to g.d.o/core if you're a member; I'm not.
Comment #20
Crell CreditAttribution: Crell commentedVery +1 on documenting all return and parameter types, unconditionally. Doxygen is the only major PHP documentation format I know of that does not expect it. All IDEs I've used provide them in their template auto-generated docblocks. It's useful information for anyone trying to understand an API, and also, I believe, can help us encourage putting a useful description in the "description" part of the docblock, rather than just "an int" or "an id", which is a largely useless docblock.
I think some parts of the database layer already do that, but I'm not certain.
We already verified in another issue that NetBeans, at least, and I presume Eclipse, is surprisingly smart about figuring out what to do with parameter and return types, even multiple-choice ones like int|SomeClass.
Once again, huge +1 here.
Comment #21
Lars Toomre CreditAttribution: Lars Toomre commentedI am a strong believer that all @param data types should be documented.
Since this patch will apply to both D8 and D7, shouldn't this patch (and all other documentation patches like it) be applied (when RTBC) before the great divergence due to the moving to /core file structure patch gets applied?
Should I bother reviewing this patch now or wait until it is re-rolled after November 1st?
Comment #22
boombatower CreditAttribution: boombatower commentedYea, I used to document it, but ended up trying to fit the standard...completely agree with documenting them all. What catch said in #18 is true as well and more reason to do so.
Comment #23
DjebbZ CreditAttribution: DjebbZ commentedIt's obvious that all @param should be documented. It's faster to look at one place to know precisely what data types are needed. One undocumented param maybe obvious and easy to guess for someone and not for someone else. Good docs are exhaustive.
I already started to do this in my code and noticed my IDE (NetBeans 7) didn't know what to do with a data type in @return though (it was fine with @param).
Comment #24
pillarsdotnet CreditAttribution: pillarsdotnet commentedRemoving tag which obviously no longer applies.
Comment #25
Lars Toomre CreditAttribution: Lars Toomre commentedI have gone through and reviewed the patch and the doc changes all look appropriate.
I would mark this RBTC except for confusion on my part about when to use '@return mixed' vis-a-vis say '@return string|boolean'. I thought the latter example is preferred when there are only two possible return types so that IDEs knew what to expect. Any guidance on when to use each @return alternative?
Comment #25.0
Lars Toomre CreditAttribution: Lars Toomre commentedUpdate status.
Comment #26
pillarsdotnet CreditAttribution: pillarsdotnet commentedUpdated summary.
Comment #27
webchickcatch implied there might be some ambiguity around this point, so I'm here to clarify. This patch, despite its unquestionable awesomeness, is not the kind of thing we can backport to D7 since it's in effect changing the coding standards. Since 7.0 didn't enforce a rule of specifying data types, we can't introduce such a rule in 7.9.
Huge +1 for D8 though!
Comment #28
webchickSorry. Unintentional cross-post.
Comment #28.0
webchickUpdate summary.
Comment #29
webchickAlso, tagging as DX. Having these datatypes will be super helpful.
Comment #30
pillarsdotnet CreditAttribution: pillarsdotnet commented@webchick
So the Coding standards should be split into 7.x and 8.x versions? Or do we update it for 8.x and just live with the fact that 7.x violates the current standard?
Comment #31
webchickYeah, update the coding standards and live with it. That's what we've done in the past. There's no harm in specifying the 8.x coding standards early in D7 for contributed modules.
Comment #32
catchWe did the same thing for string concatenation. I'm not sure if coder actively discourages adding data type now but if it does it'd be worth an issue/patch to coder to stop doing so for D7, then people can follow this if they want to in their modules without triggering warnings.
Comment #33
pillarsdotnet CreditAttribution: pillarsdotnet commented@Lars Toomre
The latter example is not mentioned by the coding standards nor used anywhere in core:
A quick glance through the API module reveals that it doesn't really care what happens after
@param
or@return
, so I guess there's no technical reason we shouldn't support such a standard.Comment #34
Lars Toomre CreditAttribution: Lars Toomre commented@webchick re #27 - I think there is some confusion in the community about coding standards and what is applicable and when. For instance, @sun in #1159356-9: Better error handling asserts:
Drupal coding standards are version-independent and "always-current". All new code should follow the current standards, regardless of (core) version. Existing code in older versions may be updated, but doesn't necessarily have to be. Especially for larger code-bases (like Drupal core), updating the code of a previous version for current standards may too huge of a task. However, code in current versions should follow the current standards. Lastly, when following this practice, make sure to not squeeze coding standards updates/clean-ups into otherwise unrelated patches.
Based on your comment #27 above, does this mean patches for D7 will be rejected if they now include @param and @return type hinting? Or will D7 have some combination of the old and newer coding standards? If the latter is true, I would argue that this is a 'nice to have' patch that will help D7 DX now (while D8 is in development for the next several years).
Comment #35
pillarsdotnet CreditAttribution: pillarsdotnet commented@catch:
Searching through coder, I can't find where it does anything with the text following
'* @param'
other than ensuring a blank line before the@return
line.If this policy change goes through, I should probably write a D8 coder patch to issue a warning if the datatype is absent. I'm maintaining a D8 version locally anyway.
Comment #35.0
pillarsdotnet CreditAttribution: pillarsdotnet commentedFixed tag nesting error.
Comment #36
Lars Toomre CreditAttribution: Lars Toomre commented@pillarsdotnet re: "when to use '@return mixed' vis-a-vis say '@return string|boolean'."
I cannot find the issue now, but there was discussion about the @return format like @Crell referenced in #20 above. Perhaps @Crell or @jhodgdon can give some guidance here?
Comment #37
pillarsdotnet CreditAttribution: pillarsdotnet commentedGetting a bit offtopic, but we even have a weird
@param ...
pattern to indicate a variable number of arguments fetched viafunc_get_args()
.I'd add that pattern to the standards, but I lack the necessary privileges.
Posted: #1295576: Document the de-facto standard of using "@param ..." to indicate a variable number of function arguments.
Comment #38
joachim CreditAttribution: joachim commented> I believe, can help us encourage putting a useful description in the "description" part of the docblock, rather than just "an int" or "an id", which is a largely useless docblock.
I don't think it does that. We do want people to write more than 'an int' in the description, absolutely. But making them do this first is fixing the wrong thing.
Furthermore, I think that adding a type like 'string' or 'integer' tells you nothing. You still have to read the description to know what the integer represents, or what kind of strings are valid. And as for arrays... in Drupal, you *definitely* need to read the documentation to know what to put in an array parameter ;)
So adds no useful information, but creates noise in the documentation. I'm a -1 on this.
Comment #39
Crell CreditAttribution: Crell commentedI have never once viewed type information in a docblock as noise. I've viewed it as a developer who cared enough to leave me breadcrumbs to figure out what is going on.
This is the issue I mentioned previously: #711918: Documentation standard for @param and @return data types. In it we opted to favor int|string over "mixed", and determined that NetBeans, at least, is really damned good with @return data types.
The current coding standards say that the @param type is not required, but it's also not disallowed. I see no problem with patches going forward, starting right now, for D7 or D8, specifying types.
Comment #40
joachim CreditAttribution: joachim commentedIt's a variable-length piece of text that means my eye can't predictably find the place to scan down for the names of the variables.
It adds little useful meaning, as I still have to read the description to know what the int or string should actually be.
Hence I call it noise. But I could say a drop in readability for little added meaning.
Comment #41
Lars Toomre CreditAttribution: Lars Toomre commented@pillarsdotnet - re: #25 - Based on #39 and what is defined in Documenting functions and methods, I can confirm now that the use of '@return mixed' is deprecated. Instead, the form should be '@return x|y' where x and y are types like string and boolean. This patch will need to be re-rolled for the preferred @return doc.
Comment #42
pillarsdotnet CreditAttribution: pillarsdotnet commentedOkay, I missed this bit in the doc page before.
Can someone explain to me why that says
Parser|false
rather thanParser|FALSE
or evenParser|bool
?Comment #42.0
pillarsdotnet CreditAttribution: pillarsdotnet commentedAdd coder patch to "Remaining tasks" list.
Comment #42.1
pillarsdotnet CreditAttribution: pillarsdotnet commentedUpdated to reflect that 'mixed' is now deprecated, as per #41.
Comment #43
pillarsdotnet CreditAttribution: pillarsdotnet commentedReplaced all instances of
mixed
withfoo|true|false|null
as appropriate. Would really appreciate an answer to #42 before changing status to CNR, because this just feels wrong to me, despite being compliant with the current standards (which we are discussing changing anyway).Comment #44
pillarsdotnet CreditAttribution: pillarsdotnet commentedAnother question: should it be
@param bool
or@param boolean
? I see examples of each in core.Comment #45
Lars Toomre CreditAttribution: Lars Toomre commented@pillarsdotnet - re: bool|boolean - Heck, if I know which is appropriate. However, that core discourages abbreviations in variable and function names, I would recommend using 'boolean'.
Perhaps we should open a new issue for 's/@param bool /@param boolean /'? My fear is that such a documentation correction will not be implemented before November 1st nd the re-rolling of all D8 patches.
Comment #46
pillarsdotnet CreditAttribution: pillarsdotnet commentedPosted: #1296208: Standardize on either '@param bool $foo' or '@param boolean $foo' and document the decision.
Comment #46.0
pillarsdotnet CreditAttribution: pillarsdotnet commentedFixed another tag nesting error and changed "Remaining tasks" to an ordered list.
Comment #47
pillarsdotnet CreditAttribution: pillarsdotnet commentedUpdated summary to reflect that
bool
is preferred overboolean
for type-hinting.See #1296208: Standardize on either '@param bool $foo' or '@param boolean $foo' and document the decision.
Comment #48
jhodgdonThere have been about 30 comments or more since yesterday on this issue....
Have you made changes to the coding standards? If so, what were they and can they be shown in the issue summary? And have they been added to the coding standards docs?
AND why didn't this issue have the "coding standards" tag if coding standards were going to be discussed????? We now have a list of standard issue tags (see link below the tags field and its sub-pages). This is a standard tag that should be on ALL coding standards issues... sigh.
Comment #49
pillarsdotnet CreditAttribution: pillarsdotnet commented@jhodgdon:
No; I don't have permission. I can't even view the source to properly roll a patch.
Ah. I suspected there was a relevant tag but was too lazy to look it up; thanks.
Comment #50
Lars Toomre CreditAttribution: Lars Toomre commentedI am confused about when @param and @return type hinting should be used.
Say we have a patch that needs to be applied to both D8 and D7. As I understand now, the D8 patch should include the type hinting. Assuming that the patch also applies to D7 without change, should a separate patch nonetheless be rolled removing all of the type hinting documentation for D7?
Comment #51
webchickYes, that's correct. It's the same as the concatenation differences between D6 and D7+.
Comment #52
pillarsdotnet CreditAttribution: pillarsdotnet commented@#50
No. But if the patch happens to touch (but not modify) other lines that lack such type-hinting, or if the patch applies type-hinting to some functions in a file but not others, the patch submitter should resist "fixing what ain't broke".At least, that is my interpretation of the guidelines as they now stand. I will gladly receive correction if anyone knows otherwise.EDIT: retracted; sorry about the contradictory crosspost.
Comment #53
pillarsdotnet CreditAttribution: pillarsdotnet commented@#51:
If we're going to be rolling different D8 and D7 patches based on different coding standards, then we really need to fork the coding standards into separate version-specific pages. Should that be discussed here, or in a separate issue?
Comment #54
jhodgdonSo. Has everyone (except me of course) already agreed that this is a good change do docs standards for D8? Is someone actually planning to go through every single core function and method header and put these things in? And have the key developers agreed that they are going to follow this for every new function and every change to every function? I personally think this is not a realistic idea unless the core dev team has bought into it.
So I don't have time to read this discussion, sorry. Busy day. Can someone please summarize who agreed to this and whether it's actually been agreed to? And not to mention why it's so necessary all of a sudden, when in d7 it was like pulling teeth to even get people to agree that we could add it as a "suggested good idea" rather than even close to a mandated standard?
Comment #55
pillarsdotnet CreditAttribution: pillarsdotnet commented@jhodgdon
No; joachim is also opposed, and several thousand developers have neglected to chime in on this issue.
I volunteered to tackle the
includes/*.inc
files; you're recruiting a list of volunteers for the rest, so yes.I'll update the Issue summary.
Comment #56
Lars Toomre CreditAttribution: Lars Toomre commented@jhodgdon - I am sorry that you feel like you have not been included. However, based upon your comment #711918-52: Documentation standard for @param and @return data types, it never even occurred to me that you might object to type hinting being implemented for D8 docblocks. I thought you were proposing that all of the docblocks be updated. Is this no longer how you feel?
Comment #57
jhodgdonI am *not* planning to recruit volunteers for this task. I am planning on recruiting volunteers to do some more basic cleanup, like making sure there is a return between @param and @return, and that every function has a docblock, and the summaries are one line less than 80 characters. This is a much more involved task that requires a lot more inspection and thought. It cannot just be whipped out in a short session by novices.
And it's not that I feel that I wasn't included. I'm just trying to find out what you all think has been decided without reading through the 30 comments I missed between yesterday and today (which I have NO TIME TO READ, sorry), so I asked for a summary and so far no one has provided one :(
Comment #57.0
jhodgdonDocument preference of 'bool' over 'boolean'.
Comment #57.1
pillarsdotnet CreditAttribution: pillarsdotnet commentedAdded a voting list in response to jhodghdon asking "Was this approved? By whom?"
Comment #58
pillarsdotnet CreditAttribution: pillarsdotnet commented@jhodghdon:
Fine; I'll roll the entire patch myself; it's not hard once there is a standard to follow. Let me know whether you'd prefer one giant patch, one patch per file, patch per module, etc. I'm tired of arguing about such things.
Summary updated, but I'll copy it here:
EDIT: Based on recent comments I conclude that jhodgdon is definitely opposed, which kinda makes this whole issue a non-starter.
Comment #59
Lars Toomre CreditAttribution: Lars Toomre commented@webchick - re: #51 - Thanks for your clarification. For D7 patches, there should not be any type hinting for @param or @return doc statements.
Your response also clarifies that @sun's assertion in #1159356-9: Better error handling is not true. This means one should not follow @sun's statement, "Drupal coding standards are version-independent and 'always-current'. All new code should follow the current standards, regardless of (core) version. Existing code in older versions may be updated, but doesn't necessarily have to be."
Comment #59.0
pillarsdotnet CreditAttribution: pillarsdotnet commentedConverted votes to ordered lists.
Comment #59.1
pillarsdotnet CreditAttribution: pillarsdotnet commentedAdd "int" versus "integer" to the mix.
Comment #60
pillarsdotnet CreditAttribution: pillarsdotnet commentedI would tend to disagree. The published standard for D7 was and is:
and
In other words, type-hinting is "recommended" in certain cases; "not needed" in others. It is never forbidden nor required. Removing all type-hinting from D7 core would be nearly as big a patch as adding it to all of D8 core.
Personally, I find the current standard to be ambiguous because I lack the particular variety of "common sense" that appears to be assumed here.
Comment #61
jhodgdonI do not see comments here by all of those people stating they are in favor of fixing all of core and volunteering to review/roll the patches? I started at the top of the list, and there is no comment from chx on this issue at all?
Comment #62
jhodgdonAnd I want to state that I think the standard is a good idea in the abstract, I just do not think (as I explained on the other issue -- why are we discussing this in two places??!? I am getting confused) it is practical to apply to all of core/contrib Drupal code as a standard that suddenly all code will be out of date on and need to be patched. This is not an automatic patch. It requires thought to write, and thought to review. It's not like "oh we need a space around ." or "we need a blank line between @param and @return sections".
Comment #63
pillarsdotnet CreditAttribution: pillarsdotnet commentedNo; I had to read through three separate issues. If you like, I can reference or copy/paste the quotes that led me to that conclusion, but I fear you won't have time to read it anyway.
I'm sorry if I gave the mistaken impression that the people listed under "In favor" were volunteering to roll patches. I will change the text to "In favor of the standards change" and "Opposed to the standards change".
No. (searching...) chx commented here and was quoted here as being in favor of a wholesale change, broken up by module, into "a zillion sub-issues", pending your blessing.
Comment #63.0
pillarsdotnet CreditAttribution: pillarsdotnet commentedI'd say jhodgdon is definitely opposed.
Comment #64
pillarsdotnet CreditAttribution: pillarsdotnet commentedYou're correct. Closing as duplicate.
Comment #64.0
pillarsdotnet CreditAttribution: pillarsdotnet commentedClarifying what "In favor" and "Opposed" means, and moving jhodgdon to the "In favor" list as per her most recent comment.
Comment #65
webchickJust to clarify something...
"And not to mention why it's so necessary all of a sudden, when in d7 it was like pulling teeth to even get people to agree that we could add it as a "suggested good idea" rather than even close to a mandated standard?"
In D7 it was like pulling teeth because of the timing of the initiative to introduce it (post code freeze), since it effectively represented an "API change." In D8 it's completely acceptable to revamp coding standards recommendations. Just as we introduced a different concatenation separator in D7.
Comment #66
webchickOops.
Comment #66.0
webchickRe-read jhodgdon's comment -- she's neither in favor nor opposed; she just thinks it is not practical.
Comment #67
Crell CreditAttribution: Crell commentedBoy this issue got busy...
Re Webchick in #51, I would agree with #60. I don't see anything in the current coding standards that forbids the use of a primitive type in a docblock, and core has some usage of param types scattered around. Various contrib modules (like, any I've written at least) already have them. I don't see why we would start not allowing them in D7 patches.
Going forward, I don't believe we need to have one massive uber-patch. This is the sort of thing that we can work on over time, hell even as part of other issues. (Changing this function? OK, fix its docblock, too, since I'm changing the function signature anyway.) Then we can do another walk-through later once we're done changing the code being documented to make sure any missing @param types are filled in.
I am not volunteering to write a mega-patch, but I have every intention of putting types on all of my @params going forward. I already do, but I intend to keep doing so. :-)
pillars: Um, Dave Reid hasn't commented in this issue that I see. Why do you have him listed as having an opinion?
Comment #68
Crell CreditAttribution: Crell commentedJebus these threads are moving fast...
Comment #69
pillarsdotnet CreditAttribution: pillarsdotnet commentedFrom his comments here and here, I got the impression that he doesn't care either way; he just doesn't like change.
Again, feel free to make corrections. jhodgdon asked for a poll, so I did the best I could.
Comment #70
pillarsdotnet CreditAttribution: pillarsdotnet commentedAnd at any rate, further discussion should take place at #711918: Documentation standard for @param and @return data types
Comment #71
sun#1296842: Clarify scope of PHP coding standards for core (major version) and contrib code
Comment #71.0
sunShould have used preview; sigh.
Comment #71.1
plachplach +1
Comment #72
rafamd CreditAttribution: rafamd commentedFor us coming from strongly typed languages (ex. java), this is very nice to have. Reading ahead *might* be necessary to understand the variable, but it's a bit of information that you can rely on (you know it's going to be there) and together with a meaningful name is a very nice starting point.
+1
EDIT: sorry, this is the dupe, re-posting to the active issue.
Comment #72.0
rafamd CreditAttribution: rafamd commentedAdding myself as a supporter for the change.
Comment #73
xjm