---
title: "lint/laravel/require-phpdoc-types-only"
pagination: false
---

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

<RuleId id="lint/laravel/require-phpdoc-types-only" />

Not in any set. Unsafe fix: it can change behaviour. Runs when laravel is installed.

## What it does

Keeps only type annotations in PHPDoc.

## Configuration

```toml title="pun.toml"
[lint.rules]
"laravel/require-phpdoc-types-only" = "error"
```

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

## Replaces

- [`Pint/phpdoc_type_annotations_only`](https://laravel.com/docs/pint) (pint)

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