---
title: "format/strings/heredoc-closing-marker"
pagination: false
---

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

<RuleId id="format/strings/heredoc-closing-marker" />

Not in any preset. Safe fix.

## What it does

Unify `heredoc` or `nowdoc` closing marker.

## Configuration

```toml title="pun.toml"
[format.rules]
"strings/heredoc-closing-marker" = 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 |
| --- | --- | --- | --- | --- |
| `closing-marker` | `string` | Any | `"EOD"` | `closing_marker` |
| `explicit-heredoc-style` | `bool` | Any | `false` | `explicit_heredoc_style` |
| `reserved-closing-markers` | `list` | Any | `["CSS", "DIFF", "HTML", "JS", "JSON", "MD", "PHP", "PYTHON", "RST", "TS", "SQL", "XML", "YAML"]` | `reserved_closing_markers` |

## Replaces

- [`heredoc_closing_marker`](https://cs.symfony.com/doc/rules/string_notation/heredoc_closing_marker.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)
