You need to make sure of two things to get hinting to work
class Bar {
/**
* @return \Foo
*/
function getSomeObject() {
return new \Foo();
}
}
- Set up your code in a project. This lets Netbeans know where your code can be found
- Document your code with phpdoc comments. This way, Netbeans has a clear path to follow (in your example, does
getSomeObject
have an@return
declaration?). Netbeans makes this easy. Just type/**<enter>
and Netbeans will make the block for you and autocomplete the block as you type