---
title: "format/classes/single-member-per-statement"
pagination: false
---

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

<RuleId id="format/classes/single-member-per-statement" />

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

## What it does

There MUST NOT be more than one property or constant declared per statement.

## Configuration

```toml title="pun.toml"
[format.rules]
"classes/single-member-per-statement" = 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` | `list` | `const`, `property` | `["const", "property"]` | `elements` |

## Replaces

- [`single_class_element_per_statement`](https://cs.symfony.com/doc/rules/class_notation/single_class_element_per_statement.html) (php-cs-fixer)
- [`SplitGroupedClassConstants`](https://getrector.com/rule-detail/split-grouped-class-constants-rector) (rector)
- [`SplitGroupedProperties`](https://getrector.com/rule-detail/split-grouped-properties-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)
