---
title: "analyse/classes/dynamic-static-call"
pagination: false
---

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

<RuleId id="analyse/classes/dynamic-static-call" />

In the [`analyse-strict`](/docs/rules/presets/analyse-strict) preset and every stricter one. Report only. Upstream gates: `strictRules.dynamicCallOnStaticMethod`.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"classes/dynamic-static-call" = "on"
```

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

## Replaces

- [`DynamicCallOnStaticMethodsRule`](https://github.com/phpstan/phpstan-strict-rules#readme) (phpstan-classes)
- [`DynamicStaticMethodCall`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`staticMethod.dynamicCall`](https://phpstan.org/error-identifiers/staticMethod.dynamicCall) (phpstan-strict-rules)

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