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

Improve message even more

This commit is contained in:
Matt Brown 2020-10-07 12:41:36 -04:00 committed by Daniil Gentili
parent b85cff5491
commit 44a3f2d084
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -142,9 +142,14 @@ class AlgebraAnalyzer
if ($negated_clause_2_contains_1_possibilities) {
$mini_formula_2 = Algebra::negateFormula([$negated_clause_2]);
if (count($mini_formula_2) === 1) {
$paradox_message = 'Condition (' . $mini_formula_2[0] . ')'
. ' contradicts a previously-established condition (' . $clause_1 . ')';
if (!$mini_formula_2[0]->wedge) {
if (count($mini_formula_2) > 1) {
$paradox_message = 'Condition ((' . implode(') && (', $mini_formula_2) . '))'
. ' contradicts a previously-established condition (' . $clause_1 . ')';
} else {
$paradox_message = 'Condition (' . $mini_formula_2[0] . ')'
. ' contradicts a previously-established condition (' . $clause_1 . ')';
}
} else {
$paradox_message = 'Condition not(' . $negated_clause_2 . ')'
. ' contradicts a previously-established condition (' . $clause_1 . ')';