An open API service indexing awesome lists of open source software.

https://github.com/staabm/phpstorm-bug-unreachable-statement


https://github.com/staabm/phpstorm-bug-unreachable-statement

Last synced: 7 days ago
JSON representation

Awesome Lists containing this project

README

          

[JetBrains PHPStorm bugreport](https://youtrack.jetbrains.com/issue/WI-81787/Unreachable-statement-false-positive)

PHPStorm reports "unreachable code" for a interface type, when the project does only contain a single implementation of the interface.

see `src/Foo.php`.

Image

the interface type could be implemented by other classes though, see e.g. `vendor/nikic/php-parser/lib/PhpParser` which contains 3 more implementations of the `Node` interface.
=> PHPStorm cannot be sure which class will implement the interface and therefore should not report "unreachable code".