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 194945 - code completion for @method doesn't work in static context
Summary: code completion for @method doesn't work in static context
Status: RESOLVED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 13:24 UTC by Irker
Modified: 2011-06-09 12:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Irker 2011-02-01 13:24:08 UTC
/**
 * @method int foo()
 */
class A { 
    /**
     * @static
     */
    public static function __callStatic() {}      
}
$a = new A(); 
$a->|   // ALL OK. foo() method show
A::|    // NOT OK!  foo() method not show
Comment 1 OndrejBrejla 2011-02-21 11:10:44 UTC
Yes, but how should NetBeans know that the declared @method is static? Maybe there should be some kind of a @staticmethod annotation, but there is no @staticmethod annotation in the phpDocumentor specification...so...
Comment 2 Irker 2011-02-21 11:19:45 UTC
There is no need to specify a static or non-static method.
I think that the hint must be output in any case.
According to the PHP documentation for a maximum of bad:
Calling non-static methods statically generates an E_STRICT level warning.
Comment 3 Tomas Mysik 2011-06-08 14:21:14 UTC

*** This bug has been marked as a duplicate of bug 170541 ***
Comment 4 Tomas Mysik 2011-06-08 14:21:52 UTC
Sorry, incorrect tab in browser.
Comment 5 Petr Pisl 2011-06-09 12:01:37 UTC
There is an option in the Tools->Options->Editor Tab-> Code Completion Tab-> Choose PHP Language. You should see the option "Also Non-Static Methods after "::"" in Code Completion for Class Methods group.