Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #54279 [HttpFoundation] Improve the return type of ParameterBag…
…::getEnum (stof) This PR was merged into the 7.1 branch. Discussion ---------- [HttpFoundation] Improve the return type of ParameterBag::getEnum | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | n/a | License | MIT The return value can only be null when using null as default value. when providing an enum instance as default value, we know that the return value will always be an enum instance. This will help projects using static analysis tools. See https://phpstan.org/r/885d8322-b16c-4ebb-97ab-e5babfa8b692 which corresponds to the behavior with this PR applied vs https://phpstan.org/r/14693953-bad8-4e61-b026-527bf33cf342 which corresponds to the current behavior. Commits ------- 6fbacb6 Improve the return type of ParameterBag::getEnum
- Loading branch information