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 222701 - Auto complete for PHPSpec2 ObjectBehavior
Summary: Auto complete for PHPSpec2 ObjectBehavior
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-24 20:25 UTC by umpirsky
Modified: 2012-11-24 20:26 UTC (History)
0 users

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 umpirsky 2012-11-24 20:25:55 UTC
When you write specs, you are extending PHPSpec2\ObjectBehavior which have __call() method forwarding calls to underlying object. 
https://github.com/phpspec/phpspec2/blob/develop/src/PHPSpec2/ObjectBehavior.php#L46

This means that you can call all methods from the underlying object from your specs, but because of the magic __call() you don't get auto complete for this methods.

What would be useful in this case is if NetBeans can support something like this:

/* @var $this Foo */

Or something similar so spec can pick all methods from Foo class and show auto complete for this methods.

It would be perfect if this magic can be added at the top of the file, or even better in class doc block so it can be declared once and used in all class methods.