Skip to content

Max Type Coverage Level using withTypeCoverageLevel method #8984

Answered by TomasVotruba
vinceAmstoutz asked this question in Q&A
Discussion options

You must be logged in to vote

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 to TypeDeclarationLevel::RULES where all the rules are listed: https://github.com/rectorphp/rector-src/blob/abaf47c828502d09a968590292aafe71d34e3e17/src/Config/Level/TypeDeclarationLevel.php#L66-L136

Right now there is ~70-80 rules, so max level is the same number.

That's the whole magic :)

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@vinceAmstoutz
Comment options

@TomasVotruba
Comment options

@vinceAmstoutz
Comment options

@TomasVotruba
Comment options

Answer selected by vinceAmstoutz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants