---
title: "format/control-flow/switch-case-space"
pagination: false
---

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

<RuleId id="format/control-flow/switch-case-space" />

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

## What it does

Removes extra spaces between colon and case value.

## Configuration

```toml title="pun.toml"
[format.rules]
"control-flow/switch-case-space" = true
```

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

## Replaces

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

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