lint/statements/require-strict-types
In the code-quality set. Safe fix where types prove it, unsafe otherwise. Intent: suspicious.
What it does
Force a strict types mode in all files.
Configuration
[lint.rules]
"statements/require-strict-types" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
preserve-existing-declaration |
bool |
Any | false |
preserve_existing_declaration |
strategy |
enum |
remove, add-when-missing, enforce |
"enforce" |
strategy |
Replaces
declare_strict_types(php-cs-fixer, risky)strict-types(mago-linter)