[ 
https://issues.apache.org/jira/browse/NETBEANS-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16934448#comment-16934448
 ] 

SL EF commented on NETBEANS-1291:
---------------------------------

Hello, [~junichi11], that would be great if you can fix this issue because in 
many projects we often write something like "return self[]" or "return 
static[]".

Just to clarify that "self[]" and "ClassA[]" can make a big difference for 
extended classes. Unfortunately for now we have to choose: write correctly or 
make working auto-completion.

> PHP DOC : autocomplete array of static dosen't work
> ---------------------------------------------------
>
>                 Key: NETBEANS-1291
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1291
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: php - Editor
>    Affects Versions: 8.2, 9.0, 10.0, 11.0, 11.1
>         Environment: Windows 10
>            Reporter: rd_v_s
>            Priority: Minor
>              Labels: autocomplete, documentation, php, phpdoc
>
> Hi,
> the autocomplete dosen't work on array of static.
> That doesn't support self and $this too.
> And there is 2 way for document return of table : array<T> or T[]
> The phpdoc documentation : http://docs.phpdoc.org/guides/types.html
> See exemple below :
> {code:java}
> abstract class A {
>   /**
>    * return array of class
>    * @return static[]
>    */
>   function returnArrayOfClass() {
>   }
> }
> class B extends A {
>   public $b;
>   /**
>    * return array of class
>    * @return B[]
>    */
>   function returnArrayOfClassB() {
>   }
> }
> $oB = new B();
> $aB = $oB->returnArrayOfClass();
> foreach ($aB as $b) {
>   $b->b;//dosen't autocomplete b
> }
> $aB2 = $oB->returnArrayOfClassB();
> foreach ($aB2 as $b2) {
>   $b2->b; //autocomplete b
> }
> {code}
> Regards,



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to