Skip to content

Commit

Permalink
Include loose comparison with >/>=/</<=
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah authored Jan 6, 2023
1 parent cb0e968 commit f0e44bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hooks/InsaneComparisonAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ public static function afterExpressionAnalysis(AfterExpressionAnalysisEvent $eve
$expr = $event->getExpr();
$statements_source = $event->getStatementsSource();
$codebase = $event->getCodebase();
if (!$expr instanceof Expr\BinaryOp\Equal && !$expr instanceof Expr\BinaryOp\NotEqual) {
if (!$expr instanceof Expr\BinaryOp\Equal
&& !$expr instanceof Expr\BinaryOp\NotEqual
&& !$expr instanceof Expr\BinaryOp\Greater
&& !$expr instanceof Expr\BinaryOp\GreaterOrEqual
&& !$expr instanceof Expr\BinaryOp\Smaller
&& !$expr instanceof Expr\BinaryOp\SmallerOrEqual
) {
return true;
}

Expand Down

0 comments on commit f0e44bf

Please sign in to comment.