Mago 0.1.2 introduces a new linter rule to enhance your PHPUnit test quality by detecting redundant instanceof
assertions.
🆕 New Feature: php-unit/redundant-instanceof
This release adds the php-unit/redundant-instanceof
rule to the linter, helping you identify unnecessary instanceof
assertions in your test methods.
An instanceof
assertion is considered redundant if the subject is always an instance of the class being checked. This rule improves test clarity by highlighting and eliminating assertions that always pass or fail.
To view detailed documentation and examples for this rule, use:
mago lint --explain php-unit/redundant-instance-of