Closed szepeviktor closed 5 years ago
hi @szepeviktor
I don't think we should remove the return type, it is correct.
Since the IDE can recognize the return doc, phpstan should also be able to :)
1) I think IDE-s prioritize: PHPDoc,
phpstan: type of actually returned self::$sessions
2) SessionInterface as type hint is different from SessionInterface|Connection, see coming https://wiki.php.net/rfc/union_types
What do you think?
SessionInterface implementations differ.
...as return type hint, see https://wiki.php.net/rfc/union_types
From https://github.com/swoft-cloud/swoft/pull/968