---
title: "analyse/classes/new-static-in-abstract"
pagination: false
---

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

<RuleId id="analyse/classes/new-static-in-abstract" />

In the [`analyse-basic`](/docs/rules/presets/analyse-basic) preset and every stricter one. Report only. Upstream gates: `bleedingEdge (featureToggles.newStaticInAbstractClassStaticMethod)`.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"classes/new-static-in-abstract" = "on"
```

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

## Replaces

- [`NewStaticInAbstractClassStaticMethodRule`](https://phpstan.org/error-identifiers/new.staticInAbstractClassStaticMethod) (phpstan-classes)
- [`new.staticInAbstractClassStaticMethod`](https://phpstan.org/error-identifiers/new.staticInAbstractClassStaticMethod) (phpstan)

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