---
title: "analyse/statements/invalid-declare-strict-types"
pagination: false
---

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

<RuleId id="analyse/statements/invalid-declare-strict-types" />

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

## Configuration

```toml title="pun.toml"
[analyse.rules]
"statements/invalid-declare-strict-types" = "on"
```

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

## Replaces

- [`DeclareStrictTypesRule`](https://phpstan.org/error-identifiers/declareStrictTypes.notFirst) (phpstan-classes)
- [`declareStrictTypes.notFirst`](https://phpstan.org/error-identifiers/declareStrictTypes.notFirst) (phpstan)
- [`declareStrictTypes.value`](https://phpstan.org/error-identifiers/declareStrictTypes.value) (phpstan)

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