---
title: "analyse/dead-code/unused-private-property"
pagination: false
---

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

<RuleId id="analyse/dead-code/unused-private-property" />

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

## Configuration

```toml title="pun.toml"
[analyse.rules]
"dead-code/unused-private-property" = "on"
```

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

## Replaces

- [`UnusedPrivatePropertyRule`](https://phpstan.org/error-identifiers/property.neverRead) (phpstan-classes)
- [`UnusedProperty`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`WriteOnlyProperty`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`property.neverRead`](https://phpstan.org/error-identifiers/property.neverRead) (phpstan)
- [`property.neverWritten`](https://phpstan.org/error-identifiers/property.neverWritten) (phpstan)
- [`property.onlyRead`](https://phpstan.org/error-identifiers/property.onlyRead) (phpstan)

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