You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Tomáš Procházka (Jira)" <ji...@apache.org> on 2020/07/02 16:19:00 UTC
[jira] [Commented] (NETBEANS-4185) PHP: Phpdoc is ignored when
:self return type used
[ https://issues.apache.org/jira/browse/NETBEANS-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17150419#comment-17150419 ]
Tomáš Procházka commented on NETBEANS-4185:
-------------------------------------------
Cause of this problem seems to be similar to NETBEANS-4509.
When return type is specified as native type, then content of PHPDoc {{@return}} is ignored.
If return type {{self}} is removed from method definition, then code completion works as expected.
> PHP: Phpdoc is ignored when :self return type used
> --------------------------------------------------
>
> Key: NETBEANS-4185
> URL: https://issues.apache.org/jira/browse/NETBEANS-4185
> Project: NetBeans
> Issue Type: Bug
> Components: php - Code Analysis, php - Refactoring
> Affects Versions: 11.0, 11.2
> Reporter: Michael Vorisek
> Priority: Critical
>
> {code:php}
> class A
> {
> public $x;
> /**
> * @return static
> */
> public function x(): self { }
> }
> class B extends A
> {
> public $y;
> }
> $cl = new B();
> $cl->x()-> // ->y is not autohinted due to the "self" return type even if documented with "static" return type
> {code}
> The return type of B::x() should be "B" (static) instead of "A" (self).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists