---
title: "analyse/undefined/method"
pagination: false
---

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

<RuleId id="analyse/undefined/method" />

In the [`analyse-basic`](/docs/rules/presets/analyse-basic) preset and every stricter one. Report only.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"undefined/method" = "on"
```

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

## Replaces

- [`CallMethodsRule`](https://phpstan.org/error-identifiers/argument.bitmaskNotAllowed) (phpstan-classes)
- [`checkThisOnly`](https://phpstan.org/config-reference) (phpstan-parameters)
- [`reportMagicMethods`](https://phpstan.org/config-reference) (phpstan-parameters)
- [`NonExistentMethod`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`PossiblyNonExistentMethod`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`method.nameNotString`](https://phpstan.org/error-identifiers/method.nameNotString) (phpstan)
- [`method.notFound`](https://phpstan.org/error-identifiers/method.notFound) (phpstan)

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