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 - Doc block does not recognize array dereferencing notation
Summary: Doc block does not recognize array dereferencing notation
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
Depends on:
Reported: 2012-01-19 17:55 UTC by schkovich
Modified: 2016-09-22 02:08 UTC (History)
1 user (show)

See Also:
Exception Reporter:

sample classes (655 bytes, application/x-php)
2012-01-19 17:55 UTC, schkovich
Starting patch. (8.41 KB, patch)
2012-02-24 10:47 UTC, Ondrej Brejla
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 should be an enhancement.
Comment 2 schkovich 2012-01-20 10:51:10 UTC
(In reply to comment #1)
> It's not 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