1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Merge pull request #6498 from MorrisJobke/fix/catch-ComplicatedExpressionException-in-ArrayFilterReturnTypeProvider.php

Catch ComplicatedExpressionException in ArrayFilterReturnTypeProvider
This commit is contained in:
orklah 2021-09-20 16:53:48 +02:00 committed by GitHub
commit d32b1be5a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,14 +245,18 @@ class ArrayFilterReturnTypeProvider implements \Psalm\Plugin\EventHandler\Functi
$cond_object_id = \spl_object_id($stmt->expr);
$filter_clauses = \Psalm\Internal\Algebra\FormulaGenerator::getFormula(
$cond_object_id,
$cond_object_id,
$stmt->expr,
$context->self,
$statements_source,
$codebase
);
try {
$filter_clauses = \Psalm\Internal\Algebra\FormulaGenerator::getFormula(
$cond_object_id,
$cond_object_id,
$stmt->expr,
$context->self,
$statements_source,
$codebase
);
} catch (\Psalm\Exception\ComplicatedExpressionException $e) {
$filter_clauses = [];
}
$assertions = \Psalm\Internal\Algebra::getTruthsFromFormula(
$filter_clauses,