mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Report invalid number of arguments for psalm-taint-*
This commit is contained in:
parent
395f3f7862
commit
da69803823
@ -238,6 +238,8 @@ final class FunctionLikeDocblockParser
|
||||
|
||||
if (count($param_parts) >= 2) {
|
||||
$info->taint_sink_params[] = ['name' => $param_parts[1], 'taint' => $param_parts[0]];
|
||||
} else {
|
||||
throw new IncorrectDocblockException('@psalm-taint-sink expects 2 arguments');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -279,6 +281,8 @@ final class FunctionLikeDocblockParser
|
||||
|
||||
if ($param_parts[0]) {
|
||||
$info->taint_source_types[] = $param_parts[0];
|
||||
} else {
|
||||
throw new IncorrectDocblockException('@psalm-taint-source expects 1 argument');
|
||||
}
|
||||
}
|
||||
} elseif (isset($parsed_docblock->tags['return-taint'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user