lint/pest/prefer-to-have-length
In the lint-strict preset. In Rector’s pest/coding-style set. Needs the pest extension. Unsafe fix: it can change behavior.
What it does
Converts strlen()/mb_strlen() comparisons to toHaveLength() matcher
Configuration
[lint.rules]
"pest/prefer-to-have-length" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
UseToHaveLength(pest-plugin-rector)