Search code examples
phpphpdoc

What does "no short description for property" from phpDoc mean?


I'm getting this critical error when running phpDoc on a class file of mine:

No short description for property $id.

This is the relevant code:

/** @type int The user's id. */
private $id = 0;

I believe this is the way used in the documentation.

So what does this error mean and how can I solve it?


Solution

  • Use @var instead of @type:

    /**
     * @var integer The user's id. 
     */
    private $id = 0;