---
title: "format/classes/member-separation"
pagination: false
---

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

<RuleId id="format/classes/member-separation" />

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

## What it does

Class, trait and interface elements must be separated with one or none blank line.

## Configuration

```toml title="pun.toml"
[format.rules]
"classes/member-separation" = 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 |
| --- | --- | --- | --- | --- |
| `elements` | `map` | `none`, `one`, `only-if-meta` | `{ "const" = "one", "method" = "one", "property" = "one", "trait-import" = "none", "case" = "none" }` | `elements` |

## Replaces

- [`class_attributes_separation`](https://cs.symfony.com/doc/rules/class_notation/class_attributes_separation.html) (php-cs-fixer)
- [`NewlineBetweenClassLikeStmts`](https://getrector.com/rule-detail/newline-between-class-like-stmts-rector) (rector)

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