---
title: "lint/types/add-refactor-param-phpdoc"
pagination: false
---

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

<RuleId id="lint/types/add-refactor-param-phpdoc" />

Not in any preset. In Rector's [`rector/rector-preset`](/docs/rules/sets/rector/rector-preset) set. Safe fix.

## What it does

Add @param node type to refactor() method based on getNodeTypes() of a Rector rule, to avoid instanceof checks and unknown types reported by PHPStan

## Configuration

```toml title="pun.toml"
[lint.rules]
"types/add-refactor-param-phpdoc" = "error"
```

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

## Replaces

- [`AddParamTypeToRefactorMethod`](https://getrector.com/rule-detail/add-param-type-to-refactor-method-rector) (rector)

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