Skip to content

Commit e1d0346

Browse files
authored
Merge pull request #394 from ergebnis/fix/condition
Fix: Avoid comparing boolean with boolean
2 parents 2b886ee + 76ec046 commit e1d0346

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

psalm-baseline.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<code>toString</code>
99
<code>toString</code>
1010
</MixedMethodCall>
11-
<RedundantIdentityWithTrue occurrences="1">
12-
<code>true === $allowAbstractClasses</code>
13-
</RedundantIdentityWithTrue>
1411
</file>
1512
<file src="src/Classes/NoExtendsRule.php">
1613
<MixedArgument occurrences="1">

src/Classes/FinalRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(
5757
return $classNotRequiredToBeAbstractOrFinal;
5858
}, $classesNotRequiredToBeAbstractOrFinal);
5959

60-
if (true === $allowAbstractClasses) {
60+
if ($allowAbstractClasses) {
6161
$this->errorMessageTemplate = 'Class %s is neither abstract nor final.';
6262
}
6363
}
@@ -87,7 +87,7 @@ public function processNode(
8787
return [];
8888
}
8989

90-
if (true === $this->allowAbstractClasses && $node->isAbstract()) {
90+
if ($this->allowAbstractClasses && $node->isAbstract()) {
9191
return [];
9292
}
9393

0 commit comments

Comments
 (0)