1
0
Fork 0

Use SymbolKind::CONSTRUCTOR for constructors

pull/79/head
Felix Becker 2016-10-13 23:05:13 +02:00
parent c479969758
commit c71009011b
2 changed files with 7 additions and 4 deletions

View File

@ -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)
{

View File

@ -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) {