---
title: "format/phpdoc/types"
pagination: false
---

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

<RuleId id="format/phpdoc/types" />

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

## What it does

The correct case must be used for standard PHP types in PHPDoc.

## Configuration

```toml title="pun.toml"
[format.rules]
"phpdoc/types" = 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 |
| --- | --- | --- | --- | --- |
| `exclude` | `list` | `$this`, `array`, `bool`, `boolean`, `callable`, `double`, `false`, `float`, `int`, `integer`, `iterable`, `mixed`, `null`, `object`, `parent`, `resource`, `scalar`, `self`, `static`, `string`, `true`, `void` | `[]` | `exclude` |
| `groups` | `list` | `alias`, `meta`, `simple` | `["alias", "meta", "simple"]` | `groups` |

## Replaces

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

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