---
title: "format/statements/declare-equal"
pagination: false
---

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

<RuleId id="format/statements/declare-equal" />

In the [`format-laravel`](/docs/rules/presets/format-laravel) and [`format-psr12`](/docs/rules/presets/format-psr12) presets. Safe fix.

## What it does

Equal sign in declare statement should be surrounded by spaces or not following configuration.

## Configuration

```toml title="pun.toml"
[format.rules]
"statements/declare-equal" = true
```

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

## Options

| Name | Type | Allowed values | Default | Upstream name |
| --- | --- | --- | --- | --- |
| `space` | `enum` | `single`, `none` | `"none"` | `space` |

## Replaces

- [`declare_equal_normalize`](https://cs.symfony.com/doc/rules/language_construct/declare_equal_normalize.html) (php-cs-fixer)

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