Closed (fixed)
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
26 Jan 2018 at 13:17 UTC
Updated:
14 Jul 2019 at 17:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
borisson_Let's also make sure that #2858021: fix {inheritdoc} typos is integrated in this issue as well, making sure that the
@sign is included.Comment #3
damienmckennaThe PHPDoc spec says it should be spelled with an uppercase "d".
Comment #4
damienmckennaComment #5
klausiThe problem is that our coding standards explicitly say we should write it with lower case d. There is a coding standards discussion at #3060580: Allow inheritdoc and inheritDoc? to maybe change that.
Until that is settled I think we should allow both variants in Coder.
Comment #6
br0kenComment #7
br0kenComment #8
klausiNice, thanks a lot! The approach is not perfect because now it would allow {@InHeRiTdOc}, right? That is a bit ugly, so better we check for the exact casing instead?
I think this is not a good example because it allows aditional text in the comment. I think {@inheritDoc} should only be used standalone, if you need to modify the comment on a function then you should copy the content from the parent class to make it clear. I know we are not forbidding it in Coder yet, but we should not add more examples that do this.
Can you replace this with just {@inheritDoc} and nothing else?
we should not modify the DrupalPractice standard with this change, so this example should also go into the Drupal standard good.php
Can you also file this as pull request against https://github.com/pfrenssen/coder ? Then we see the automated tests run.
Comment #9
rosinegrean commentedComment #11
klausiUpdated the patch and committed it, thanks!