fixed param counting
parent
3b4e0c3275
commit
a7c094eacb
|
@ -162,12 +162,12 @@ class SignatureHelpProvider
|
||||||
}
|
}
|
||||||
$help->activeSignature = 0;
|
$help->activeSignature = 0;
|
||||||
$help->activeParameter = 0;
|
$help->activeParameter = 0;
|
||||||
|
$params = ltrim($params, "( ");
|
||||||
if (strlen(trim($params))) {
|
if (strlen(trim($params))) {
|
||||||
try {
|
try {
|
||||||
$params = $this->parser->parse('<?php $a = [' . $params . '];', $this->parserErrorHandler)[0]->expr->items;
|
$params = $this->parser->parse('<?php $a = [' . $params . '];', $this->parserErrorHandler)[0]->expr->items;
|
||||||
$help->activeParameter = count($params);
|
$help->activeParameter = count($params) - 1;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $ignore) { }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$help->signatures[] = $signature;
|
$help->signatures[] = $signature;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue