---
title: "format/tags/no-closing"
pagination: false
---

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

<RuleId id="format/tags/no-closing" />

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

## What it does

The closing `?>` tag MUST be omitted from files containing only PHP.

## Configuration

```toml title="pun.toml"
[format.rules]
"tags/no-closing" = true
```

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

## Replaces

- [`no_closing_tag`](https://cs.symfony.com/doc/rules/php_tag/no_closing_tag.html) (php-cs-fixer)
- [`no-closing-tag`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-closing-tag) (mago-linter)
- [`no-php-tag-terminator`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-php-tag-terminator) (mago-linter)
- [`whitespace.fileEnd`](https://phpstan.org/error-identifiers/whitespace.fileEnd) (phpstan)

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