---
title: "analyse/classes/invalid-property-declaration"
pagination: false
---

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

<RuleId id="analyse/classes/invalid-property-declaration" />

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

## Configuration

```toml title="pun.toml"
[analyse.rules]
"classes/invalid-property-declaration" = "on"
```

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

## Replaces

- [`PropertyInClassRule`](https://phpstan.org/error-identifiers/property.abstract) (phpstan-classes)
- [`property.abstract`](https://phpstan.org/error-identifiers/property.abstract) (phpstan)
- [`property.abstractFinal`](https://phpstan.org/error-identifiers/property.abstractFinal) (phpstan)
- [`property.abstractNonHooked`](https://phpstan.org/error-identifiers/property.abstractNonHooked) (phpstan)
- [`property.abstractPrivate`](https://phpstan.org/error-identifiers/property.abstractPrivate) (phpstan)
- [`property.abstractWithoutAbstractHook`](https://phpstan.org/error-identifiers/property.abstractWithoutAbstractHook) (phpstan)
- [`property.final`](https://phpstan.org/error-identifiers/property.final) (phpstan)
- [`property.finalPrivate`](https://phpstan.org/error-identifiers/property.finalPrivate) (phpstan)
- [`property.finalPrivateHook`](https://phpstan.org/error-identifiers/property.finalPrivateHook) (phpstan)
- [`property.hookReadOnly`](https://phpstan.org/error-identifiers/property.hookReadOnly) (phpstan)
- [`property.hookWithoutBody`](https://phpstan.org/error-identifiers/property.hookWithoutBody) (phpstan)
- [`property.hookedStatic`](https://phpstan.org/error-identifiers/property.hookedStatic) (phpstan)
- [`property.hooksNotSupported`](https://phpstan.org/error-identifiers/property.hooksNotSupported) (phpstan)
- [`property.staticAsymmetricVisibility`](https://phpstan.org/error-identifiers/property.staticAsymmetricVisibility) (phpstan)
- [`property.virtualDefault`](https://phpstan.org/error-identifiers/property.virtualDefault) (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)
