---
title: "format/strings/heredoc-indentation"
pagination: false
---

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

<RuleId id="format/strings/heredoc-indentation" />

Not in any preset. Safe fix.

## What it does

Heredoc/nowdoc content must be properly indented.

## Configuration

```toml title="pun.toml"
[format.rules]
"strings/heredoc-indentation" = 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 |
| --- | --- | --- | --- | --- |
| `indentation` | `enum` | `start-plus-one`, `same-as-start` | `"start-plus-one"` | `indentation` |

## Replaces

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

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