1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
This commit is contained in:
Brown 2020-03-24 14:49:05 -04:00
parent cae15b6c62
commit 1e480ade12
2 changed files with 2 additions and 2 deletions

View File

@ -614,7 +614,7 @@ class CommentAnalyzer
foreach ($parsed_docblock['specials']['template-typeof'] as $template_typeof) {
$typeof_parts = preg_split('/[\s]+/', preg_replace('@^[ \t]*\*@m', '', $template_typeof));
if (count($typeof_parts) < 2 || $typeof_parts[1][0] !== '$') {
if ($typeof_parts === false || count($typeof_parts) < 2 || $typeof_parts[1][0] !== '$') {
throw new IncorrectDocblockException('Misplaced variable');
}

View File

@ -203,7 +203,7 @@ class ArrayFilterReturnTypeProvider implements \Psalm\Plugin\Hook\FunctionReturn
$changed_var_ids,
['$inner_type' => true],
$statements_source,
$statements_source->getTemplateTypeMap(),
$statements_source->getTemplateTypeMap() ?: [],
false,
new CodeLocation($statements_source, $stmt)
);