Reputation: 31959
I usually put the documentation in the interface if I can:
interface SenderInterface
{
/**
* Sends Email to user
*
* @param UserInterface $receiver
* @param string $msg
*/
public function sendEmail(UserInterface $receiver, $msg)
//...
{
I then inherit the doc like this to avoid redundancy.
class Sender implements SenderInterface
{
/**
* {@inheritDoc}
*/
public function sendEmail(UserInterface $receiver, $msg)
//...
{
Is there a way to see the inherited doc directly into the Sender class
without having to open the SenderInterface
in PHPStorm?
Upvotes: 11
Views: 6369
Reputation: 165501
The upcoming PhpStorm v6 has much better support of {@inheritDoc}
(in comparison to v5 and earlier).
The functionality you require is already working fine in EAP build (Early Access Program) -- you can try it yourself from here: http://confluence.jetbrains.net/display/WI/Web+IDE+EAP
Command to view documentation is View | Quick Documentation (Ctrl+Q .. or whatever shortcut you may have there)
Upvotes: 14