PHP 8.0 | TypeDeclaration sniffs: examine properties declared in the constructor correctly by jrfnl · Pull Request #1447 · PHPCompatibility/PHPCompatibility
added 2 commits
December 26, 2022 02:28…tructor Typed properties declared via a class constructor should also be examined by the `NewTypedProperties` sniff as the allowed types for properties are different than those for parameters. Includes: * Adding `T_FUNCTION` to the tokens to be examined. * Splitting the "type checking" logic off into its own method to allow for multiple properties declared in a constructor. Includes unit tests. Ref: https://wiki.php.net/rfc/constructor_promotion
jrfnl
mentioned this pull request
40 tasks
wimg approved these changes Dec 30, 2022
wimg
deleted the
php-8.0/newtypedproperties-newparamtype-support-constructor-property-promotion
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters