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

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

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

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

## What it does

Annotations in PHPDoc should be ordered in defined sequence.

## Configuration

```toml title="pun.toml"
[format.rules]
"phpdoc/order" = 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 |
| --- | --- | --- | --- | --- |
| `order` | `list` | Any | `["param", "throws", "return"]` | `order` |

## Replaces

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