D
D
Dmitry2017-02-14 11:47:16
phpstorm
Dmitry, 2017-02-14 11:47:16

How to enable return value checking for an interface?

Hello, I have an interface in PHPDoc which has a return type defined.
7e2724aefaa64d7f89fe51bf052a8df2.png
In the implementation of this interface, the return type differs from that specified in the interface's PHPDoc, PhpStorm does not highlight this as a possible error.
9769bae21bef4b8fb8daba17c341c314.png
The PHPDoc interface works correctly for autocompletion.
095a671463354e649fed6f1ac6df4bde.png
If you copy the PHPDoc of the interface into the implementation then a warning is displayed.
26352bc46ea743fea2d95e26fa119427.png
I want this warning to be displayed without copying the PHPDoc, is that possible?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question