mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix bugs
This commit is contained in:
parent
cae15b6c62
commit
1e480ade12
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user