With netbeans, you may document your variable with the following syntax :
/* @var $variable MyClass */
$variable = getSomething();
// netbeans will assume that your variable is the MyClass type and will provide code completion.
To auto-complete this string, you may use the following shortcut: type vdoc
and press Tab
key.