Skip to content

Commit

Permalink
Add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Jan 28, 2022
1 parent 7aca2ba commit a421988
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -64,6 +64,8 @@ public static function analyze(

$post_leaving_if_context = null;

// we cap this at max depth of 4 to prevent quadratic behaviour
// when analysing <expr> || <expr> || <expr> || <expr> || <expr>
if (!$stmt->left instanceof PhpParser\Node\Expr\BinaryOp\BooleanOr
|| !$stmt->left->left instanceof PhpParser\Node\Expr\BinaryOp\BooleanOr
|| !$stmt->left->left->left instanceof PhpParser\Node\Expr\BinaryOp\BooleanOr
Expand Down

0 comments on commit a421988

Please sign in to comment.