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