---
title: "format/attributes/empty-parentheses"
pagination: false
---

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

<RuleId id="format/attributes/empty-parentheses" />

Not in any preset. Safe fix.

## What it does

PHP attributes declared without arguments must (not) be followed by empty parentheses.

## Configuration

```toml title="pun.toml"
[format.rules]
"attributes/empty-parentheses" = 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 |
| --- | --- | --- | --- | --- |
| `use-parentheses` | `bool` | Any | `false` | `use_parentheses` |

## Replaces

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

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