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:
commit
d32b1be5a3
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user