backendtea/useless-match

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:phpstan-extension

pkg:composer/backendtea/useless-match

1.0.0 2025-12-30 16:53 UTC

This package is auto-updated.

Last update: 2025-12-30 16:55:36 UTC


README

A PHPStan rule to report match expressions with 2 arms, one of which is a default. As these could be an if/else instead.

Installation

$ composer require backendtea/useless-match

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include rules.neon in your project's PHPStan config:

includes:
    - vendor/phpstan/backendtea/useless-match/rules.neon