Closed (fixed)
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2017 at 08:36 UTC
Updated:
24 May 2019 at 14:44 UTC
Jump to comment: Most recent
Comments
Comment #2
andypostbtw It could lead to false positives when function really defines argument as
\stdClassComment #3
mile23This should be allowed:
...since
\stdClassis a valid type hint.It's an almost useless type hint, but it's valid. :-)
Also, in .inc files, InvalidTypeHint gives a pass to
stdClassas a hint, but not\stdClass. See #2723621-37: Fix Drupal.Commenting.FunctionComment.IncorrectTypeHint and Drupal.Commenting.FunctionComment.InvalidTypeHintComment #4
idebr commentedComment #6
klausiCommitted a fix for this, thanks for reporting!