Skip to content

Commit

Permalink
Readme: whitelist what forbidNotNormalizedType supports (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal authored Apr 2, 2024
1 parent a919257 commit db342d8
Showing 1 changed file with 8 additions and 1 deletion.
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

0 comments on commit db342d8

Please sign in to comment.