Skip to content

Commit

Permalink
Readme: suggest reportAnyTypeWideningInVarTag along enforceListReturn (
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Mar 26, 2024
1 parent 66c30cb commit 7738dab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ iterator_to_array($fn()); // denied, would fail
- Enforces usage of `list<T>` when list is always returned from a class method or function
- When only single return with empty array is present in the method, it is not considered as list
- Does nothing when [list types](https://phpstan.org/blog/phpstan-1-9-0-with-phpdoc-asserts-list-type#list-type) are disabled in PHPStan
- Consider enabling also [reportAnyTypeWideningInVarTag](https://phpstan.org/config-reference#reportanytypewideninginvartag) in native PHPStan as it mostly affects lists
```php
/**
* @return array<string>
Expand Down

0 comments on commit 7738dab

Please sign in to comment.