Conversation
49607b6 to
93b42a2
Compare
93b42a2 to
6dbf9e4
Compare
|
Escaped mutants here. This means tests need to be written so that when the code changes like that, there will be some tests that will fail. Possibly the code logic might be wrong too. |
I'm not sure what should be expected here. The mutant can only occurs if we pass Also if I try to support "maybe array" with something like I'll still get "false positive" escaped mutant because now |
|
Maybe array is also for example
Type inference and error reporting are two independent different parts of PHPStan. Type inference should still do something sensible even if the user passes a wrong type there. Especially when the wrong type might not even be reported on a lower rule level. |
6a6e148 to
84f0514
Compare
|
No mutant escaped now @ondrejmirtes :) The lint 8.0 failure seems unrelated/random |
I also rebased and fixed all my existing PR if you have time for a look https://github.com/phpstan/phpstan-src/pulls/VincentLanglet. |
60e714b to
fcb64d0
Compare
|
|
||
| assertType('non-empty-string', strtr($nonFalseyString, [$s => $nonEmptyString])); | ||
| assertType('non-falsy-string', strtr($nonFalseyString, [$nonEmptyString => $nonFalseyString])); | ||
| assertType('non-falsy-string', strtr($nonFalseyString, [$nonFalseyString => $nonFalseyString])); |
There was a problem hiding this comment.
| assertType('non-falsy-string', strtr($nonFalseyString, [$nonFalseyString => $nonFalseyString])); | |
| assertType('non-falsy-string', strtr($nonFalseyString, [$nonFalseyString => $nonFalseyString])); | |
| // see https://3v4l.org/jCUhW/rfc#vgit.master | |
| assertType('string', strtr($nonFalseyString, [$nonFalseyString => $s])); | |
| assertType('string', strtr($nonEmptyString, [$nonEmptyString => $s])); |
fcb64d0 to
de36dc2
Compare
Closes phpstan/phpstan#13708