---
title: "format/strings/heredoc-to-nowdoc"
pagination: false
---

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

<RuleId id="format/strings/heredoc-to-nowdoc" />

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

## What it does

Convert `heredoc` to `nowdoc` where possible.

## Configuration

```toml title="pun.toml"
[format.rules]
"strings/heredoc-to-nowdoc" = true
```

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

## Replaces

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