Skip to content

Commit d598321

Browse files
authored
Discard changes to src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php
1 parent fd94ce4 commit d598321

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,18 @@ public function processNode(Node $node, Scope $scope): array
4040
if (!($expectedArgumentValue instanceof ConstFetch)) {
4141
return [];
4242
}
43-
$expectedArgumentType = $scope->getType($expectedArgumentValue);
4443

4544
if (!AssertRuleHelper::isMethodOrStaticCallOnAssert($node, $scope)) {
4645
return [];
4746
}
4847

49-
if ($expectedArgumentType->isTrue()->yes()) {
48+
if ($expectedArgumentValue->name->toLowerString() === 'true') {
5049
return [
5150
RuleErrorBuilder::message('You should use assertTrue() instead of assertSame() when expecting "true"')->identifier('phpunit.assertTrue')->build(),
5251
];
5352
}
5453

55-
if ($expectedArgumentType->isFalse()->yes()) {
54+
if ($expectedArgumentValue->name->toLowerString() === 'false') {
5655
return [
5756
RuleErrorBuilder::message('You should use assertFalse() instead of assertSame() when expecting "false"')->identifier('phpunit.assertFalse')->build(),
5857
];

0 commit comments

Comments
 (0)