---
title: "format/functions/single-line-throw"
pagination: false
---

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

<RuleId id="format/functions/single-line-throw" />

Not in any preset. Safe fix.

## What it does

Throwing exception must be done in single line.

## Configuration

```toml title="pun.toml"
[format.rules]
"functions/single-line-throw" = true
```

To skip it in some files, add a [`@pun-ignore-file`](/docs/configuration/ignore-comments) comment.

## Replaces

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

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