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

Allow a comma as separator

This commit is contained in:
ralila 2021-11-14 22:18:12 +01:00
parent 7326f3b125
commit 4fd87f2d77

View File

@ -382,7 +382,7 @@ class StatementsAnalyzer extends SourceAnalyzer
if (isset($statements_analyzer->parsed_docblock->tags['psalm-trace'])) {
foreach ($statements_analyzer->parsed_docblock->tags['psalm-trace'] as $traced_variable_line) {
$possible_traced_variable_names = preg_split('/\s+/', $traced_variable_line);
$possible_traced_variable_names = preg_split('/(?:\s*,\s*|\s+)/', $traced_variable_line);
if ($possible_traced_variable_names) {
$traced_variables = array_merge(
$traced_variables,