lint/style/prefer-early-return
In the code-quality set. Safe fix.
What it does
Return early instead of nesting the rest of the function in an if or else.
Configuration
[lint.rules]
"style/prefer-early-return" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
ChangeIfElseValueAssignToEarlyReturn(rector)prefer-early-return(mago-linter)