---
title: "format/casing/keywords"
pagination: false
---

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

<RuleId id="format/casing/keywords" />

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

## What it does

PHP keywords MUST be in lower case.

## Configuration

```toml title="pun.toml"
[format.rules]
"casing/keywords" = true
```

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

## Replaces

- [`lowercase_keywords`](https://cs.symfony.com/doc/rules/casing/lowercase_keywords.html) (php-cs-fixer)
- [`lowercase-keyword`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#lowercase-keyword) (mago-linter)

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