When using php-code-validator together with PHPStan on a project, there is no way to satisfy both tools. When using return type array in a doc block, PHPStan gives the following error:
Method Foo\AuthMiddlewareTest::dataProviderTestProcess() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
Fixing this in a way that satisfies PHPStan then causes php-code-validator to throw an error along the lines of
Return type "array<string>" is discouraged
Disabling the rule in PHPStan would be an option, but at the cost of statistical analysis accuracy.