phpDoc @var for compound statement isn't displayed correctly

匆匆过客 提交于 2019-12-13 05:14:54

问题


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:

What am I doing wrong?


回答1:


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).



来源:https://stackoverflow.com/questions/26067905/phpdoc-var-for-compound-statement-isnt-displayed-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!