---
title: "analyse/control-flow/unhandled-match"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="analyse/control-flow/unhandled-match" />

In the [`analyse-recommended`](/docs/rules/presets/analyse-recommended) preset and every stricter one. Report only.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"control-flow/unhandled-match" = "on"
```

To skip it in some files or lines, add an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`MatchExpressionRule`](https://phpstan.org/error-identifiers/match.alwaysFalse) (phpstan-classes)
- [`MatchNotExhaustive`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`match.alwaysFalse`](https://phpstan.org/error-identifiers/match.alwaysFalse) (phpstan)
- [`match.alwaysTrue`](https://phpstan.org/error-identifiers/match.alwaysTrue) (phpstan)
- [`match.unhandled`](https://phpstan.org/error-identifiers/match.unhandled) (phpstan)

[More analyse/control-flow rules](/docs/rules/analyse/control-flow) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
