Pado
Pado

Reputation: 1637

phpDocumentor: DocBlock with @var tags duplicates descriptions

I have this DocBlock in a php abstract class:

/**
* @var string $foo a useful foo and <code>some.code()</code> too
* @var string $bar a useless bar
*
* @todo do something with <code>$this->bar</code>
*/
protected $foo, $bar;

I parsed this class with phpDocumentor; and here's the html result:

As you can see both $foo and $bar shares the same description (the $foo one) and markdown is not parsed too. On the other hand markdown of @todo tag is properly parsed.

Where am I wrong? Did I miss something?

I found a bug ticket about markdown in @var tags: Has it something to do with this issue maybe?

Upvotes: 0

Views: 376

Answers (1)

Machavity
Machavity

Reputation: 31644

I always document above the var itself. Maybe that's the issue

/**
* @var string $foo a useful foo and <code>some.code()</code> too
*/
protected $foo;
/*
* @var string $bar a useless bar
*
* @todo do something with <code>$this->bar</code>
*/
protected $bar;

Upvotes: 1

Related Questions