PHP: Type hints for fields with Eclipse PDT

Posted by Silvio Donnini on Stack Overflow See other posts from Stack Overflow or by Silvio Donnini
Published on 2010-04-15T08:59:45Z Indexed on 2010/04/15 9:03 UTC
Read the original article Hit count: 382

Using Eclipse + PDT, I know that you can specify the return type of a method or the type of a variable within a method via type hints.

How about class fields? Can I declare the type of a field in order to enable autocompletion for that variable?

I tried something on the lines of:

class MyClass {

  protected $Field; /* @var $Field MyType */

  ...

but it doesn't work.

Is there a way to achieve autocompletion of class fields with Eclipse and PDT?

thanks,

Silvio

© Stack Overflow or respective owner

Related posts about php5

Related posts about eclipse-pdt