---
title: "lint/control-flow/prefer-combined-isset"
pagination: false
---

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

<RuleId id="lint/control-flow/prefer-combined-isset" />

In the [`code-quality`](/docs/rules/sets/code-quality) set. Safe fix.

## What it does

Using `isset($var) &&` multiple times should be done in one call.

## Configuration

```toml title="pun.toml"
[lint.rules]
"control-flow/prefer-combined-isset" = "error"
```

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

## Replaces

- [`combine_consecutive_issets`](https://cs.symfony.com/doc/rules/language_construct/combine_consecutive_issets.html) (php-cs-fixer)
- [`combine-consecutive-issets`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#combine-consecutive-issets) (mago-linter)

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