Max Type Coverage Level using withTypeCoverageLevel method #8984
-
What is the maximum value of the level parameter of |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
You can use PHP_INT_MAX i guess :) |
Beta Was this translation helpful? Give feedback.
-
Levels are temporary approach to get your project in shape gradually, without much pressure . |
Beta Was this translation helpful? Give feedback.
-
This will help with to understand too high level :) rectorphp/rector-src#6735 |
Beta Was this translation helpful? Give feedback.
This might help: https://getrector.com/documentation/levels#content-one-level-at-a-time
1 level = 1 rule. Depending on codebase size and complexity, you can jump 1 or 5 or 10 steps at a time. We do 1 level/rule at at time, because legacy projects we work with are really huge.
If you clik on
withTypeCoverageLevel()
method, the IDE will lead you toTypeDeclarationLevel::RULES
where all the rules are listed: https://github.com/rectorphp/rector-src/blob/abaf47c828502d09a968590292aafe71d34e3e17/src/Config/Level/TypeDeclarationLevel.php#L66-L136Right now there is ~70-80 rules, so max level is the same number.
That's the whole magic :)