1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
This commit is contained in:
Daniil Gentili 2023-10-21 19:10:09 +02:00
parent 90dea2f947
commit dc2b7245b2

View File

@ -960,7 +960,11 @@ final class TypeParser
} }
assert(count($parse_tree->children) === 2); assert(count($parse_tree->children) === 2);
$get_int_range_bound = static function (ParseTree $parse_tree, Union $generic_param, string $bound_name): ?int { $get_int_range_bound = static function (
ParseTree $parse_tree,
Union $generic_param,
string $bound_name,
): ?int {
if (!$parse_tree instanceof Value if (!$parse_tree instanceof Value
|| count($generic_param->getAtomicTypes()) > 1 || count($generic_param->getAtomicTypes()) > 1
|| (!$generic_param->getSingleAtomic() instanceof TLiteralInt || (!$generic_param->getSingleAtomic() instanceof TLiteralInt