---
title: "analyse/types/phpdoc-readonly-property-write"
pagination: false
---

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

<RuleId id="analyse/types/phpdoc-readonly-property-write" />

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

## Configuration

```toml title="pun.toml"
[analyse.rules]
"types/phpdoc-readonly-property-write" = "on"
```

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

## Replaces

- [`ReadOnlyByPhpDocPropertyAssignRule`](https://phpstan.org/error-identifiers/property.readOnlyByPhpDocAssignNotInConstructor) (phpstan-classes)
- [`property.readOnlyByPhpDocAssignNotInConstructor`](https://phpstan.org/error-identifiers/property.readOnlyByPhpDocAssignNotInConstructor) (phpstan)
- [`property.readOnlyByPhpDocAssignNotOnThis`](https://phpstan.org/error-identifiers/property.readOnlyByPhpDocAssignNotOnThis) (phpstan)
- [`property.readOnlyByPhpDocAssignOutOfClass`](https://phpstan.org/error-identifiers/property.readOnlyByPhpDocAssignOutOfClass) (phpstan)

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