1
0
Fork 0

fixed param counting

pull/250/head
Ivan Bozhanov 2017-01-20 15:36:10 +02:00
parent 3b4e0c3275
commit a7c094eacb
1 changed files with 3 additions and 3 deletions

View File

@ -162,12 +162,12 @@ class SignatureHelpProvider
}
$help->activeSignature = 0;
$help->activeParameter = 0;
$params = ltrim($params, "( ");
if (strlen(trim($params))) {
try {
$params = $this->parser->parse('<?php $a = [' . $params . '];', $this->parserErrorHandler)[0]->expr->items;
$help->activeParameter = count($params);
} catch (\Exception $e) {
}
$help->activeParameter = count($params) - 1;
} catch (\Exception $ignore) { }
}
$help->signatures[] = $signature;
}