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.
Summary: | Allow "@return self" and "@return static" to support factory methods | ||
---|---|---|---|
Product: | php | Reporter: | dharkness <dharkness> |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | Inscure, po_taka, RiaD |
Priority: | P3 | ||
Version: | 8.0.1 | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
dharkness
2011-03-11 01:36:39 UTC
Batch reassigning. Editor area. *** Bug 200773 has been marked as a duplicate of this bug. *** *** Bug 196564 has been marked as a duplicate of this bug. *** It would be really usefull as Factory is being more and more used. Fixed in web-main #f2368dd7777f Integrated into 'main-golden', will be available in build *201301300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f2368dd7777f User: Ondrej Brejla <obrejla@netbeans.org> Log: #196564 and #196565 - Allow "self", "static" and "this" in a @return annotation (improved type inference) *** Bug 225889 has been marked as a duplicate of this bug. *** Hi, static work great on Dev build, but it will be nice to allow self[], $this[] and static[] too... class classParent { public function funcParent(){} /** @return static */ static public function create($array){ //some Code } /** @return static[] */ static public function createList($array){ $return = array(); foreach($array as $createArray){ $return[] = static::create($createArray); } return $return; } } class classChild extends classParent { public function funcChild(){} } $childs = classChild::createList(array()); foreach($childs as $child){ $child-> //CC shows methods from both classChild and classParent | but "No Suggestion" classChild::create($array)-> //CC shows methods from both classChild and classParent | That's good } Thank's taht will be really usefull. This still does not work for Netbeans PHP 8.0.1 if parent and child class are in different namespaces. |