1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00

Fix new errors

This commit is contained in:
Evan Shaw 2024-02-26 21:28:59 +13:00
parent 10ed0f3cd6
commit 3535324842
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ use Psalm\Type\Reconciler;
use function array_diff_key;
use function array_filter;
use function array_keys;
use function array_key_first;
use function array_merge;
use function array_values;
use function count;
@ -80,7 +80,7 @@ final class IfConditionalAnalyzer
$entry_clauses,
static fn(Clause $c): bool => count($c->possibilities) > 1
|| $c->wedge
|| !isset($changed_var_ids[array_keys($c->possibilities)[0]])
|| !isset($changed_var_ids[array_key_first($c->possibilities)])
),
);
}

View File

@ -2982,7 +2982,7 @@ final class SimpleAssertionReconciler extends Reconciler
continue;
}
$enum_case = $class_storage->enum_cases[$atomic_type->const_name] ?? null;
$enum_case = $class_storage->enum_cases[$enum_case_to_assert] ?? null;
if ($enum_case === null) {
return null;
}