---
title: "format/statements"
pagination: false
---

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

Statements, declare and semicolons. Also in [lint](/docs/rules/lint/statements) (3) and [analyse](/docs/rules/analyse/statements) (6).

**[blank-line-before](/docs/rules/format/statements/blank-line-before)**

An empty line feed must precede any configured statement.

In the `format-laravel` preset. Safe fix.

**[braces-position](/docs/rules/format/statements/braces-position)**

Braces must be placed as configured.

In the `format-laravel` and `format-psr12` presets. Safe fix.

**[declare-equal](/docs/rules/format/statements/declare-equal)**

Equal sign in declare statement should be surrounded by spaces or not following configuration.

In the `format-laravel` and `format-psr12` presets. Safe fix.

**[declare-parentheses](/docs/rules/format/statements/declare-parentheses)**

There must not be spaces around `declare` statement parentheses.

In the `format-laravel` preset. Safe fix.

**[explicit-indirect-variable](/docs/rules/format/statements/explicit-indirect-variable)**

Add curly braces to indirect variables to make them clear to understand.

Not in any preset. Safe fix.

**[multiline-semicolon](/docs/rules/format/statements/multiline-semicolon)**

Forbid multi-line whitespace before the closing semicolon or move the semicolon to the new line for chained calls.

In the `format-laravel` preset. Safe fix.

**[no-mixed-echo-print](/docs/rules/format/statements/no-mixed-echo-print)**

Either language construct `print` or `echo` should be used.

In the `format-laravel` preset. Safe fix.

**[no-space-before-semicolon](/docs/rules/format/statements/no-space-before-semicolon)**

Single-line whitespace before closing semicolon are prohibited.

In the `format-laravel` preset. Safe fix.

**[numeric-literal-separator](/docs/rules/format/statements/numeric-literal-separator)**

Adds separators to numeric literals of any kind.

Not in any preset. Safe fix.

**[octal-notation](/docs/rules/format/statements/octal-notation)**

Literal octal must be in `0o` notation.

Not in any preset. Safe fix.

**[one-per-line](/docs/rules/format/statements/one-per-line)**

There must not be more than one statement per line.

In the `format-laravel` and `format-psr12` presets. Safe fix.

**[semicolon-after-instruction](/docs/rules/format/statements/semicolon-after-instruction)**

Instructions must be terminated with a semicolon.

Not in any preset. Safe fix.

**[single-line-empty-body](/docs/rules/format/statements/single-line-empty-body)**

Empty body of class, interface, trait, enum or function must be abbreviated as `{}` and placed on the same line as the previous symbol, separated by a single space.

In the `format-laravel` preset. Safe fix.

**[space-after-semicolon](/docs/rules/format/statements/space-after-semicolon)**

Fix whitespace after a semicolon.

In the `format-laravel` preset. Safe fix.

**[space-around-construct](/docs/rules/format/statements/space-around-construct)**

Ensures a single space after language constructs.

In the `format-laravel` and `format-psr12` presets. Safe fix.
