---
title: "lint/pest/prefer-to-be-in"
pagination: false
---

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

<RuleId id="lint/pest/prefer-to-be-in" />

In the [`coding-style`](/docs/rules/sets/coding-style) set. Unsafe fix: it can change behaviour. Runs when pest is installed.

## What it does

Converts strict in_array() checks to the toBeIn() matcher

## Configuration

```toml title="pun.toml"
[lint.rules]
"pest/prefer-to-be-in" = "error"
```

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

## Replaces

- [`UseToBeIn`](https://pestphp.com/docs/rector#content-usetobeinrector) (pest-plugin-rector)

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