Skip to content

Commit

Permalink
Ors can still be created directly from conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Feb 18, 2020
1 parent 6e80887 commit 9230b42
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Psalm/Type/Algebra.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,14 +705,20 @@ public static function combineOredClauses(array $left_clauses, array $right_clau
}
}

$creating_object_id = $right_clause->creating_object_id === $left_clause->creating_object_id
? $right_clause->creating_object_id
: null;

$clauses[] = new Clause(
$possibilities,
false,
$can_reconcile,
$right_clause->generated
|| $left_clause->generated
|| count($left_clauses) > 1
|| count($right_clauses) > 1
|| count($right_clauses) > 1,
[],
$creating_object_id
);
}
}
Expand Down

0 comments on commit 9230b42

Please sign in to comment.