Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2014 at 13:05 UTC
Updated:
29 Jul 2014 at 23:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xanoComment #2
jhodgdonIf it's returning a clone, it should not say "@return $this", because it's not returning the object whose method was called.
According to the proposed standard on
#2158497: [policy, no patch] Use "$this" and "static" in documentation for @return types
I think it should be
@return static
right?
The rest looks good to me...
Comment #3
xanoOh, meh. I saw then and told myself that was wrong, and then forgot about it. Thanks!
Comment #4
jhodgdonOK. :)
So..
Do you think that the description that was there in the @return (which has been removed) was not useful? I think it might be useful to have that information -- it is very specific. So maybe just change the return type to "static" and leave the description there?
Comment #5
xanoYou're right. I did alter the original documentation slightly to use $this instead of the current entity to be more precise. What do you think of that?
Comment #6
jhodgdonI think it's great! Good idea.
So, sorry for missing this earlier, I gave the patch one final review and found this:
Should be string|null, I think, according to the docs?
Everything else looks good. Thanks!
Comment #7
xanoFound another one too!
Comment #8
jhodgdonLooks good to me, thanks! At least, the types now match the descriptions. :)
Comment #9
berdirThis is going to conflict with #2025779: Remove ModuleInfo as it is no longer necessary :(
And this with #2167641: EntityInterface::uri() should use route name and not path.
This is a major and the other one is a critical beta blocker, can we remove those parts as the other issues will change and clean them up?
Comment #10
jhodgdonThat second one is tagged "avoid commit conflicts", so at a minimum this patch should not be committed before that issue is resolved.
Comment #11
berdir7: drupal_2180725_7.patch queued for re-testing.
Comment #13
berdirBoth referenced issues made it in, so this can now be safely re-rolled and committed I think.
Comment #14
jhodgdonActually it looks like #2025779: Remove ModuleInfo as it is no longer necessary is not done?
Comment #15
berdirTrue, but that issue has actually nothing to do with this, I linked the wrong one and didn't notice it.
This is the relevant issue: #2164827: Rename the entityInfo() and entityType() methods on EntityInterface and EntityStorageControllerInterface
Comment #16
jhodgdonAh, OK. :) Good then, time for a reroll.
Comment #17
xanoThanks for the updates! Here's a re-roll.
Comment #18
berdirThat sounds a bit strange, maybe "the ID of the entity type"?
Never seen that, I think that's just "array"?
Same here, we afaik only use the [] syntax for classes.
Comment #19
xanoThen the question would be Which entity type?, because the current context is an entity and not an entity type. This sentence is a little bit elaborate because we don't use contractions in UI texts and preferably not in documentation either.
Not for long.
Comment #20
jhodgdonI don't think that's true that "we only use the [] syntax for classes", and I'm pretty sure I've seen it used for other stuff already... but discussing on that other issue.
I also don't think it's true that we don't use contractions in UI text and documentation. Where did you get that idea?
So... when I was reviewing this patch, I only made sure it was accurate and the readability was OK. There are several places where the wording could be made slightly less awkward, but in general I am trying to be less strict about this kind of stuff because we have a lot of documentation that's just awful and really needs help... making all the Drupal docs perfectly beautiful prose is not realistic; making it all accurate and understandable is a more realistic goal. So unless we really want to redo this patch... I think we should just get this in as it is.
Comment #21
xanoWe used to have UX guidelines about not using contractions in UI texts and there has at least been consensus among some developers that we shouldn't use those in code comments either, so we don't accidentally decrease readability or translatability for non-native English speakers.
I'm fine with leaving the comments as they are, especially because I only touched one in the first place. RTBC?
Comment #22
berdirFine with me.
Comment #23
jhodgdonThanks again - committed to 8.x.