You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I ran into this issue again. which was already addressed in the old package. Even PR is mentioned as a likely solution. Can we get it into the production version if possible? Thank you for your time :)
Create a file called test.php with the code sample above...
Run phpcs test.php ...
See error message displayed
15 | ERROR | [ ] Expected type hint "iterable<string>"; found "iterable" for $iterable (Squiz.Commenting.FunctionComment.IncorrectTypeHint)
15 | ERROR | [ ] Expected type hint "int<0, 100>"; found "int" for $int (Squiz.Commenting.FunctionComment.IncorrectTypeHint)
15 | ERROR | [ ] Expected type hint "\Illuminate\Support\Collection<int, string>"; found "Collection" for $collection
| | (Squiz.Commenting.FunctionComment.IncorrectTypeHint)
Expected behavior
Errors should not occur with generics <>, just like how it works for an array
Versions (please complete the following information)
Operating System
[MacOS 15.1.1 - docker container]
PHP version
[8.1]
PHP_CodeSniffer version
[3.11.1, master]
Standard
[Squiz]
Install type
[Composer]
The text was updated successfully, but these errors were encountered:
Yeah, that's when I stumbled upon it, when leveling up PHPstan to 6. I might turn this rule off eventually, although sometimes it's better to double check
@Karpec I'd be happy to have a look at a PR. Maybe @tm1000 would be willing to port their original PR over to this repo (and add some extra tests based on the code sample above) ?
@asispts Well, PHPCS is a static analysis tool ;-)
Describe the bug
Hi, I ran into this issue again. which was already addressed in the old package. Even PR is mentioned as a likely solution. Can we get it into the production version if possible? Thank you for your time :)
Code sample
Custom ruleset
N/A
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
Expected behavior
Errors should not occur with generics <>, just like how it works for an array
Versions (please complete the following information)
The text was updated successfully, but these errors were encountered: