---
title: "format/phpdoc/align"
pagination: false
---

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

<RuleId id="format/phpdoc/align" />

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

## What it does

All items of the given PHPDoc tags must be either left-aligned or (by default) aligned vertically.

## Configuration

```toml title="pun.toml"
[format.rules]
"phpdoc/align" = 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 |
| --- | --- | --- | --- | --- |
| `align` | `enum` | `left`, `vertical` | `"vertical"` | `align` |
| `spacing` | `int-or-map` | Any | `1` | `spacing` |
| `tags` | `list` | Any | `["method", "param", "property", "return", "throws", "type", "var"]` | `tags` |

## Replaces

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

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