如果可以的话,我通常会将文档放在界面中:
interface SenderInterface
{
/**
* Sends Email to user
*
* @param UserInterface $receiver
* @param string $msg
*/
public function sendEmail(UserInterface $receiver, $msg)
//...
{
然后我像这样继承文档以避免冗余。
class Sender implements SenderInterface
{
/**
* {@inheritDoc}
*/
public function sendEmail(UserInterface $receiver, $msg)
//...
{
有没有办法直接在 PHPStormSender class
中打开继承的文档?SenderInterface