Open
Description
Describe the bug
Unsealed array shapes (https://psalm.dev/docs/annotating_code/type_syntax/array_types/#:~:text=theory%20perspective.-,Unsealed%20array%20and%20list%20shapes,-Starting%20from%20Psalm) create a false positive error with these rules:
- Squiz.Commenting.FunctionComment.MissingParamName
- Squiz.Commenting.FunctionComment.MissingParamTag
Code sample
/**
* do something
*
* @param array{foo: string, bar: string, ...} $data some data
*
* @return array<string, string>
*/
function foo( $data ) {}
To reproduce
Steps to reproduce the behavior:
- Create a file called
test.php
with the code sample above - Run
phpcs test.php ...
- See error message displayed
Doc comment for parameter "$data" missing
Missing parameter name
Expected behavior
No error.
Versions (please complete the following information):
- OS: RHEL 8
- PHP: 7.4
- PHPCS: master
- Standard: Squiz
Metadata
Metadata
Assignees
Labels
No labels