Gert de Pagter
Gert de Pagter
> Should it modify the value the constant to archive the same output? If we directly modify the value of the constant we can't tell for sure what tests cover...
Is the switch **never** covered? Or only when its switching over true/a constant? If its never covered we can always skip that; otherwise only for true and false mutator
Probably somewhere around here: https://github.com/infection/infection/blob/50c8197f27a07c099748438ed0d7f719b26d982b/src/Mutator/Boolean/TrueValue.php#L63 My best bet would be a check to see if the direct parent is the switch statement.
For completeness sake this should also be for the `false` mutator
I think we only need to check the case statements for that. So wed only need to go 1 level deep.
Won't this just error in 99% of the cases, if `bar()` is not defined elsewhere? If we can have a good check to see if that function actually exists its...
I think @ondrejmirtes may know that for phpstan, or @muglug for psalm
Another candidate for this are the `DOM*` classes. Which may return `false` sometimes
> In theory someone could write @phpstan-assert above functions that do other things as side effects as well, but maybe it doesn't happen in practice and it's still useful to...
What would that do? Does that mean `$actual` is optional/nullable?