Skip to content

Fix phpstan removing null on iterable value #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

bronek89
Copy link
Member

@bronek89 bronek89 commented Jun 6, 2022

No description provided.

@@ -31,6 +31,9 @@ jobs:
- name: "PHPStan"
run: ./bin/phpstan analyze -l 8 src examples tests/GenericCases
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should remove GenericCases from here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. I've moved examples to level 9 too.

Unfortunately, main src directory must stay on level 8, because on 9 there are too many false positives related to generics in plain strings array

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this:

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/PlainString.php                                                                                                                                                 
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  274    Parameter #1 $strings of class GW\Value\PlainStringsArray constructor expects GW\Value\ArrayValue<GW\Value\StringValue|string>, GW\Value\ArrayValue<string> given.  
  294    Parameter #1 $strings of class GW\Value\PlainStringsArray constructor expects GW\Value\ArrayValue<GW\Value\StringValue|string>, GW\Value\ArrayValue<string> given.  
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

@bronek89 bronek89 merged commit d6988a0 into master Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants