user1544337
user1544337

Reputation:

phpDoc @var for compound statement isn't displayed correctly

I have a compound statement in one of my classes and as far as I know I'm following the phpDoc docs here. This is just the relevant part of the file. The file itself and the class do have docblocks.

class contact {
    /**
     * @var PDO $pdo                The PDO class for database communication
     * @var int $id                 The id of the contact
     * @var int $clientId           The id of the client the contact is linked to
     * @var string $name            The name of the contact
     * @var string $address         The first address line (normally street and house number) of the contact
     * @var string $postal_code     The postal code of the contact
     * @var string $city            The city of the contact
     * @var string $state           The state or region of the contact
     * @var string $country         The country of the contact
     */
    protected $pdo, $id, $clientId, $name, $address, $postal_code, $city, $state, $country;

When I run phpdoc on this file, it's parsed fine without any output. However, when I look at the generated docs, the information isn't displayed correctly:

enter image description here

What am I doing wrong?

Upvotes: 1

Views: 295

Answers (1)

ashnazg
ashnazg

Reputation: 6688

This is supposed to be supported in phpDocumentor 2.x, though it was not in 1.x. Since that looks like a 2.x output template, this is likely a bug in the template that you could report as an Issue at the Github repo (https://github.com/phpDocumentor).

Upvotes: 1

Related Questions