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 159970 - vardoc - wrong type problem
Summary: vardoc - wrong type problem
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
: 156614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-10 10:19 UTC by rmatous
Modified: 2009-05-29 08:23 UTC (History)
3 users (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 rmatous 2009-03-10 10:19:10 UTC
I am having one problem though.
See example

abstract class SimpleObject {
  public function methodOne() {
  }

  public function methodTwo() {
  }
}

class ComplexObject extends SimpleObject {
  public function methodThree() {
  }
}

class Foo {

  /**
   * @var SimpleObject
   */
  private $_object;

  public function __construct(SimpleObject $example) {
    $this->_object = $example;
  }

  /**
   * Example method returns something like SimpleObject
   *
   * @return SimpleObject
   */
  public function getOject() {
    return $this->_object;
  }
}

$foo = new Foo();
$fooObject = $foo->getOject();
/* @var $fooObject ComplexObject */
$fooObject->

Here I would want the vardoc to change what the editor thinks it has in $fooObject. It currently only shows only methods
from the SimpleObject because thats what the getObject method says. But I want the vardoc to override what the method
says it is, because I know what the object type is.

It's also possible that I would want to reuse the varible name.
Comment 1 rmatous 2009-05-14 16:53:18 UTC
*** Issue 156614 has been marked as a duplicate of this issue. ***
Comment 2 rmatous 2009-05-28 11:00:58 UTC
http://hg.netbeans.org/web-main/rev/f7d4cd51aa63

Fixed for 6.8
Comment 3 Quality Engineering 2009-05-29 08:23:10 UTC
Integrated into 'main-golden', will be available in build *200905290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f7d4cd51aa63
User: Radek Matous <rmatous@netbeans.org>
Log: #159970 vardoc - wrong type problem