# MultimatchCleanup

> Holds the limits of Git's cleanup of multi-matched lines, which PHPForge\Diff\LineDiffer applies before the alignment so that lines repeated all over the other input do not anchor it.

[API reference](/docs/api/index.md) › [Diff](/docs/extensions/diff/reference/index.md) › MultimatchCleanup

| enum | `PHPForge\Diff\MultimatchCleanup` |
| --- | --- |
| Source | [`src/MultimatchCleanup.php`](https://github.com/php-forge/diff/blob/main/src/MultimatchCleanup.php#L15) |

Holds the limits of Git's cleanup of multi-matched lines, which [`LineDiffer`](/docs/extensions/diff/reference/linediffer/index.md) applies before the alignment so
that lines repeated all over the other input do not anchor it.

The values match those of Git's `xprepare.c`.

See also: <https://github.com/git/git/blob/master/xdiff/xprepare.c> (Git's `xprepare.c`.).

## Constants

| Constant | Value | Description | Defined by |
| --- | --- | --- | --- |
| <span id="const-KEEP_RUN"></span>`KEEP_RUN` | `4` | Multi-matched lines are discarded when they make up less than `1 / KEEP_RUN` of the run of unmatched and multi-matched lines around them. | `MultimatchCleanup` |
| <span id="const-MAX_EQUAL_LIMIT"></span>`MAX_EQUAL_LIMIT` | `1024` | Upper bound of the occurrence count from which a line counts as multi-matched; below it the bound is the approximate square root of the line count. | `MultimatchCleanup` |
| <span id="const-SCAN_WINDOW"></span>`SCAN_WINDOW` | `100` | Number of lines examined on each side of a multi-matched line when deciding whether to discard it. | `MultimatchCleanup` |