Use SymbolKind::CONSTRUCTOR for constructors
parent
c479969758
commit
c71009011b
|
@ -10,10 +10,9 @@ class TestClass implements TestInterface
|
|||
public static $staticTestProperty;
|
||||
public $testProperty;
|
||||
|
||||
public static function staticTestMethod()
|
||||
{
|
||||
public static function staticTestMethod() {}
|
||||
|
||||
}
|
||||
public function __construct() {}
|
||||
|
||||
public function testMethod($testParameter)
|
||||
{
|
||||
|
|
|
@ -63,7 +63,11 @@ class SymbolInformation
|
|||
throw new Exception("Not a declaration node: $class");
|
||||
}
|
||||
$symbol = new self;
|
||||
$symbol->kind = $nodeSymbolKindMap[$class];
|
||||
if ($node instanceof Node\Stmt\ClassMethod && $node->name === '__construct') {
|
||||
$symbol->kind = SymbolKind::CONSTRUCTOR;
|
||||
} else {
|
||||
$symbol->kind = $nodeSymbolKindMap[$class];
|
||||
}
|
||||
$symbol->name = (string)$node->name;
|
||||
$symbol->location = Location::fromNode($node);
|
||||
if ($fqn !== null) {
|
||||
|
|
Loading…
Reference in New Issue