---
title: "format/classes/ordered-interfaces"
pagination: false
---

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

<RuleId id="format/classes/ordered-interfaces" />

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

## What it does

Orders the interfaces in an `implements` or `interface extends` clause.

## Configuration

```toml title="pun.toml"
[format.rules]
"classes/ordered-interfaces" = 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 |
| --- | --- | --- | --- | --- |
| `case-sensitive` | `bool` | Any | `false` | `case_sensitive` |
| `direction` | `enum` | `ascending`, `descending` | `"ascending"` | `direction` |
| `sort` | `enum` | `alphabetical`, `length` | `"alphabetical"` | `order` |

## Replaces

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

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