1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

provide array column type for null column

This commit is contained in:
Mateusz Cholewka 2022-03-06 15:44:56 +01:00
parent d48965d929
commit 88d49b9923

View File

@ -114,6 +114,8 @@ class ArrayColumnReturnTypeProvider implements FunctionReturnTypeProviderInterfa
}
//array_column skips undefined elements so resulting type is necessarily defined
$result_element_type->possibly_undefined = false;
} elseif ($value_column_name === null) {
$result_element_type = new Union([$row_shape]);
} else {
$result_element_type = Type::getMixed();
}