phpstan-src
phpstan-src copied to clipboard
Fix class-const resolving will always evaluate to true/false in traits
closes https://github.com/phpstan/phpstan/issues/4570
see initial discussion and reviews in https://github.com/phpstan/phpstan-src/pull/2046
test fails without the src changes like
1) PHPStan\Rules\Comparison\ImpossibleCheckTypeFunctionCallRuleTest::testBug4570
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'
+'08: Call to function array_key_exists() with 'valueToFetch' and array{someValue: 'abc', valueToFetch: '123'} will always evaluate to true.
+08: Call to function array_key_exists() with 'valueToFetch' and array{someValue: 'abc', someOtherValue: '123'} will always evaluate to false.
'
This pull request has been marked as ready for review.
This pull request has been marked as ready for review.