Inspection error by extended class


I have a followed code (Upload id: 2022_05_24_QVpE4dBX1zzE74G3 (file: example.php)).

PHPStorm tells me by "extends C1": Declaration of 'C1->f()' must be compatible with 'I1->f()' 

But if to add in C2 method f(), that just calls parent::f(), or if to change return type in I1 to "self", there is no more error.


1 comment
Comment actions Permalink

Just for the information if anyone else is interested: in a support ticket, we have found out that the issue is not reproducible in PhpStorm 2022.1.2 anymore.


Please sign in to leave a comment.