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 206809 - MyClass[] style arrays
Summary: MyClass[] style arrays
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal with 4 votes (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-30 17:55 UTC by juzna.cz
Modified: 2012-01-06 10:10 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description juzna.cz 2011-12-30 17:55:26 UTC
Would be great to have support for more specific arrays, like in following example:

/**
 * @param string[]
 * @param Zend_Db_Table_Abstract[]
 * @param string[string]                 $hashmap Hashmap
 * @param string[int]                    $strings Number-indexed array of strings
 * @param string[string][string]         $stuff   Two dimensional hashmap
 * @param Zend_Db_Table_Abstract[string] $tables  Array of objects indexed by string
 */

Related issue for PhpStorm IDE: http://youtrack.jetbrains.net/issue/WI-6558
Comment 1 maghiel 2011-12-30 23:10:01 UTC
+1
and not only for arguments, also for return values.
Comment 2 Tomas Mysik 2012-01-02 08:45:54 UTC
Not sure whether it is official PHPDoc option.
Comment 3 Ondrej Brejla 2012-01-02 09:02:37 UTC
It's not an official option, but we considerd to implement it few month ago. But I can't find that original issue...
Comment 4 Ondrej Brejla 2012-01-06 10:10:58 UTC
From now, you can use this syntax in phpdoc and CC should work as well (of course just for main types...so for Foo[] type will be suggested methods and fields from Foo class ;). But it's in branch now. Will be merged soon.

Fixed in branch: http://hg.netbeans.org/web-main/rev/84c973591712