This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207534

Summary: Doc block does not recognize array dereferencing notation
Product: php Reporter: schkovich <schkovich>
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: STARTED ---    
Severity: normal CC: amobilia
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: sample classes
Starting patch.

Description schkovich 2012-01-19 17:55:35 UTC
Created attachment 115091 [details]
sample classes

When generating doc block for a method returning property containing array of objects does not recognize returned type.

To reproduce: 
Create classes class MyCollection and ArrayDereferencing. In class ArrayDereferencing define private property myCollection. Create doc block for property and set type to MyCollection[]. Add method getMyCollection returning myCollection to the same class. Generate doc block for method getMyCollection.

Actual result:
Type of returned value is not set: @return type 

Expected result: 
Set type to returned property type: @return MyCollection[]
Comment 1 Ondrej Brejla 2012-01-20 09:45:11 UTC
It's not supported...it should be an enhancement.
Comment 2 schkovich 2012-01-20 10:51:10 UTC
(In reply to comment #1)
> It's not supported...it should be an enhancement.

OK. From the user perspective in cases similar to this it's hard to distinguish if functionality is not supported or there is a problem in implemented functionality. My reasoning was that both returned arrays and objects will be recognized therefore @return MyCollection[] notation should be recognized as well.

Bottom line is that I don't care if it is a enhancement or a bug as long as the problem is going to be resolved. :) Of course I understand that you do care.
Comment 3 Ondrej Brejla 2012-01-20 10:56:51 UTC
Yes I understand :) I'll try to solve it, but as I remember, it's maybe not so simple as it looks like...but mayby I'm wrong :)
Comment 4 Ondrej Brejla 2012-01-20 12:04:00 UTC
Trying to improve it a bit...
Comment 5 Ondrej Brejla 2012-02-24 10:47:38 UTC
Created attachment 116082 [details]
Starting patch.

First patch...not all features available...just start ;)
Comment 6 amobilia 2016-09-22 02:08:12 UTC
Reproductible in 8.2rc / Dev 201609210002