Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme: whitelist what forbidNotNormalizedType supports #233

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,18 @@ function example($unknown) {
```

### forbidNotNormalizedType
- Reports any PhpDoc or native type that is not normalized, which can be:
- Reports PhpDoc or native type that is not normalized, which can be:
- when child and parent appears in its union or intersection
- when same type appears multiple times in its union or intersection
- when DNF is not used
- configurable by `checkDisjunctiveNormalForm`
- supports:
- parameter typehints & `@param` phpdoc
- return typehint & `@return` phpdoc
- property typehint & `@var` phpdoc
- inline `@var` phpdoc
- `@throws` phpdoc
- multi-catch statements
- Main motivation here is that PHPStan normalizes all types before analysis, so it is better to see it in codebase the same way PHPStan does

```php
Expand Down
Loading