---
title: "format/statements/blank-line-before"
pagination: false
---

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

<RuleId id="format/statements/blank-line-before" />

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

## What it does

An empty line feed must precede any configured statement.

## Configuration

```toml title="pun.toml"
[format.rules]
"statements/blank-line-before" = 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 |
| --- | --- | --- | --- | --- |
| `statements` | `list` | `break`, `case`, `continue`, `declare`, `default`, `do`, `exit`, `for`, `foreach`, `goto`, `if`, `include`, `include_once`, `phpdoc`, `require`, `require_once`, `return`, `switch`, `throw`, `try`, `while`, `yield`, `yield-from` | `["break", "continue", "declare", "return", "throw", "try"]` | `statements` |

## Replaces

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

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