Tags: Behat/Behat
Tags
[3.x] refactor: Add initial backwards-compatible return types (#1763) This is a first pass at adding backwards-compatible return types that we can safely merge into the 3.x series, as we work towards #1744. Return types are added to: * public, protected and private methods in `final` classes * private methods in `non-final` classes * `final public` methods in `non-final` classes The return types applied are based on: * Rector's type coverage rules (up to level 21) - these are based on the actual type returned where this can be conclusively determined from static analysis. * Manual modification to the phpdoc `@return` type of any interface the method implements, if this was less specific than the type that Rector detected. This is the type Rector would have used if the interface had a strict return type, but we cannot add those until 4.x. It also includes some improvements / corrections to invalid or old-style phpdoc `@return` tags for lists / arrays etc that phpstan was previously ignoring but are now checked due to the presence of a runtime return type.
PreviousNext