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: | PHP Doc @var type does not work correctly with static variables | ||
---|---|---|---|
Product: | php | Reporter: | msk |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | vriha |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
msk
2013-02-19 09:27:51 UTC
Possibly duplicate of issue 226071? VDoc can't be used before class field. You have to use common PHPDoc format
/** @var SomeClass */
You see...2 asterisks and without field name.
> $odb->... // unexpectedly we have SomeClass methods shown for this variable
That's because VDoc creates a virtual declaration of $odb variable. So as I wrote, don't use VDoc where common PHPDoc must be used. VDoc is just for use in a "code"...I think inside method bodies, cycles and such.
If you use this, everything works properely in 7.3:
<?php
class SomeClass {
function someFoo() {}
}
class Test {
/** @var SomeClass */
private static $odb;
function testStatic() {
self::$odb-> //CC works here
$odb-> //CC doesn't work here
}
}
?>
Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.6.0_34; Java HotSpot(TM) Client VM 20.9-b04
Runtime: Java(TM) SE Runtime Environment 1.6.0_34-b04
System: Linux version 3.5.0-23-generic running on i386; UTF-8; cs_CZ (nb)
|