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

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

Indentation, blank lines, line endings and trailing whitespace.

**[encoding](/docs/rules/format/whitespace/encoding)**

PHP code MUST use only UTF-8 without BOM (remove BOM).

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

**[final-newline](/docs/rules/format/whitespace/final-newline)**

A PHP file without end tag must always end with a single empty line feed.

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

**[indentation-type](/docs/rules/format/whitespace/indentation-type)**

Code MUST use configured indentation type.

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

**[inside-parentheses](/docs/rules/format/whitespace/inside-parentheses)**

Parentheses must be declared using the configured whitespace.

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

**[line-ending](/docs/rules/format/whitespace/line-ending)**

All PHP files must use same line ending.

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

**[no-blank-line-whitespace](/docs/rules/format/whitespace/no-blank-line-whitespace)**

Remove trailing whitespace at the end of blank lines.

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

**[no-extra-blank-lines](/docs/rules/format/whitespace/no-extra-blank-lines)**

Removes extra blank lines and/or blank lines following configuration.

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

**[no-trailing](/docs/rules/format/whitespace/no-trailing)**

There must be no trailing whitespace at the end of non-blank lines.

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

**[statement-indentation](/docs/rules/format/whitespace/statement-indentation)**

Each statement must be indented.

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