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.
If you have a following phpdoc block in a class method, which is valid phpdoc syntax for multiple return types: /** * @return SomeClass|null */ the code-assist feature will not work as expected. Instead of getting assist for SomeClass, it won't display anything at all. Modifying the above code to... /** * @return SomeClass */ ...however will give the correct assist. Multiple return values are often used to indicate a method returning null on failure (for example in Zend Framework), and it is valid phpdoc syntax, so having support for it would be good.
Radek, now it should be easy to fi. We talked about the merge types. Try this code: <?php class Pub { public $street; public $town; } /** * @return Pub|null */ function findPub() { return new Pub(); } $pub = findPub(); $pub-> ?>
I have fix for this.
Fixed in the trunk.
Integrated into 'main-golden', will be available in build *200812070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4f32ffb55962 User: Petr Pisl <ppisl@netbeans.org> Log: #154142 - Multiple @return types in phpdoc causes issues with code assist