What I want is that when I declare a magic method with @method PHPDoc, can i use @see so that the magic method has the same PHPDoc as the method pointed via @see
Here is the code of what I have tried. But IDE did not recognize it. I am using Netbeans 7.3.1.
/**
* @method string my_method() @see _my_method()
*/
class Foo {
public __call($name, $args) {
$name = "_".$name;
$this->$name($args);
}
/**
* @return String
*/
protected _my_method() {
return "bar";
}
}
The exact parsing will depend on which IDE you're using, but the PHPDocumentor documentation for @see shows a couple of differences from your usage:
@see tag is on its own line, not appended to the line before. @link has a separate "inline" syntax if you want to include a cross-reference inside a description ({@link http://example.com/my/bar}).@see Foo::_my_method()There is also a draft PSR to standardise the behaviour, with similar requirements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With