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 186801 - Code completition from inherited variable/methods related to current object
Summary: Code completition from inherited variable/methods related to current object
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: PHPDoc (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 12:07 UTC by Nox
Modified: 2016-09-22 14:48 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 Nox 2010-05-27 12:07:43 UTC
I'd like to suggest enhancement, that would allow us to specify, that a certain variable should not be connected with object where defined but where actually used
[code]<?php
abstract class Collection{ 
  /** @return ??? */ 
  public function set($name, $value){ 
    $this->$name = $value; 
    return $this; 
  } 
} 

class Example extends Collection{
  public function make();
} 

$bar = new Example(); 
$bar->set("xyz", 10)/* <- here should be CC for Example, not Collection
^     ^
|     |- method in Example class inherited from Collection returning $this;
|
|Example class
*/
?>
[code]

I don't know how NetBeans works internally, maybe with some hints I might help, but most likely you'll know if it's possible or not

Question is how to define which object should be returned
I understand you don't want to hack/misinterpret phpdoc
...would this be that case if we'd say
@return Collection <- would return object of mentioned class
@return $this <- would return object of actual class
... it seems pretty logical and intuitive for me

Otherwise this is something I don't know how to do otherwise
Comment 1 Filip Zamboj 2010-09-15 12:31:32 UTC
batch reassigning