From 2980941fd11e63407b2965580e09c5c2af2b47c0 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Fri, 14 Oct 2016 09:02:42 +0200 Subject: [PATCH] Use SymbolKind::FIELD for class fields (#78) --- src/Protocol/SymbolInformation.php | 2 +- tests/Server/TextDocument/DocumentSymbolTest.php | 4 ++-- tests/Server/Workspace/SymbolTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Protocol/SymbolInformation.php b/src/Protocol/SymbolInformation.php index 461b430..19bffcd 100644 --- a/src/Protocol/SymbolInformation.php +++ b/src/Protocol/SymbolInformation.php @@ -55,7 +55,7 @@ class SymbolInformation Node\Stmt\Namespace_::class => SymbolKind::NAMESPACE, Node\Stmt\Function_::class => SymbolKind::FUNCTION, Node\Stmt\ClassMethod::class => SymbolKind::METHOD, - Node\Stmt\PropertyProperty::class => SymbolKind::PROPERTY, + Node\Stmt\PropertyProperty::class => SymbolKind::FIELD, Node\Const_::class => SymbolKind::CONSTANT ]; $class = get_class($node); diff --git a/tests/Server/TextDocument/DocumentSymbolTest.php b/tests/Server/TextDocument/DocumentSymbolTest.php index 601fbf9..ba42df8 100644 --- a/tests/Server/TextDocument/DocumentSymbolTest.php +++ b/tests/Server/TextDocument/DocumentSymbolTest.php @@ -84,7 +84,7 @@ class DocumentSymbolTest extends TestCase ], [ 'name' => 'staticTestProperty', - 'kind' => SymbolKind::PROPERTY, + 'kind' => SymbolKind::FIELD, 'location' => [ 'uri' => 'symbols', 'range' => [ @@ -102,7 +102,7 @@ class DocumentSymbolTest extends TestCase ], [ 'name' => 'testProperty', - 'kind' => SymbolKind::PROPERTY, + 'kind' => SymbolKind::FIELD, 'location' => [ 'uri' => 'symbols', 'range' => [ diff --git a/tests/Server/Workspace/SymbolTest.php b/tests/Server/Workspace/SymbolTest.php index fe90cf4..49d0cc0 100644 --- a/tests/Server/Workspace/SymbolTest.php +++ b/tests/Server/Workspace/SymbolTest.php @@ -99,7 +99,7 @@ class SymbolTest extends TestCase ], [ 'name' => 'staticTestProperty', - 'kind' => SymbolKind::PROPERTY, + 'kind' => SymbolKind::FIELD, 'location' => [ 'uri' => $this->symbolsUri, 'range' => [ @@ -117,7 +117,7 @@ class SymbolTest extends TestCase ], [ 'name' => 'testProperty', - 'kind' => SymbolKind::PROPERTY, + 'kind' => SymbolKind::FIELD, 'location' => [ 'uri' => $this->symbolsUri, 'range' => [