From 394211018c5b2e4c266ad3755809a5a6f2693d47 Mon Sep 17 00:00:00 2001 From: Damjan Cvetko Date: Mon, 20 Feb 2023 15:08:21 +0100 Subject: [PATCH] New declaration line format for hover. --- src/DefinitionResolver.php | 77 ++++++++++++++++++- src/Factory/SymbolInformationFactory.php | 1 + src/Server/TextDocument.php | 11 +++ .../WithReturnTypehints.php.expected.json | 10 +-- ...rrayValueShouldBeBoolean.php.expected.json | 2 +- .../cases/classDefinition1.php.expected.json | 4 +- .../cases/classProperty1.php.expected.json | 6 +- .../cases/constants.php.expected.json | 4 +- .../cases/constants2.php.expected.json | 4 +- .../cases/constants3.php.expected.json | 4 +- .../cases/constants4.php.expected.json | 4 +- .../cases/constants5.php.expected.json | 4 +- ...tsInFunctionParamDefault.php.expected.json | 4 +- .../cases/interfaceProperty.php.expected.json | 2 +- .../cases/magicConsts.php.expected.json | 2 +- .../cases/memberAccess1.php.expected.json | 4 +- .../cases/memberAccess2.php.expected.json | 4 +- .../cases/memberAccess3.php.expected.json | 4 +- .../cases/memberAccess4.php.expected.json | 4 +- .../cases/memberAccess5.php.expected.json | 4 +- .../cases/memberCall1.php.expected.json | 4 +- .../cases/methodReturnType.php.expected.json | 8 +- .../multipleNamespaces.php.expected.json | 8 +- ...ltiplePreceedingComments.php.expected.json | 2 +- .../cases/nameToken.php.expected.json | 2 +- .../cases/objectCreation.php.expected.json | 4 +- .../cases/objectCreation2.php.expected.json | 6 +- .../cases/objectCreation3.php.expected.json | 2 +- .../cases/parent1.php.expected.json | 8 +- .../cases/parent3.php.expected.json | 8 +- .../promotedConstructor.php.expected.json | 8 +- .../cases/propertyName1.php.expected.json | 2 +- .../cases/propertyName2.php.expected.json | 2 +- .../scopedPropertyAccess.php.expected.json | 4 +- .../scopedPropertyAccess3.php.expected.json | 2 +- .../scopedPropertyAccess5.php.expected.json | 2 +- .../Validation/cases/self1.php.expected.json | 8 +- .../Validation/cases/self2.php.expected.json | 8 +- .../Validation/cases/self3.php.expected.json | 8 +- .../Validation/cases/self4.php.expected.json | 4 +- .../Validation/cases/self5.php.expected.json | 4 +- .../cases/static1.php.expected.json | 8 +- .../cases/static2.php.expected.json | 8 +- .../cases/static3.php.expected.json | 8 +- .../cases/static4.php.expected.json | 4 +- .../staticMethodReturnType.php.expected.json | 6 +- .../cases/stringVariable.php.expected.json | 4 +- ...rifyFqsenOnClassProperty.php.expected.json | 4 +- 48 files changed, 195 insertions(+), 110 deletions(-) diff --git a/src/DefinitionResolver.php b/src/DefinitionResolver.php index b06763dc..6e43cb41 100644 --- a/src/DefinitionResolver.php +++ b/src/DefinitionResolver.php @@ -6,6 +6,7 @@ use LanguageServer\Index\ReadableIndex; use LanguageServer\Factory\SymbolInformationFactory; use LanguageServerProtocol\SymbolInformation; +use LanguageServerProtocol\SymbolKind; use Microsoft\PhpParser; use Microsoft\PhpParser\Node; use Microsoft\PhpParser\FunctionLike; @@ -58,10 +59,45 @@ public function __construct(ReadableIndex $index) * Builds the declaration line for a given node. Declarations with multiple lines are trimmed. * * @param Node $node + * @param SymbolInformation|null $symbolInformation + * @param Type|null $type * @return string */ - public function getDeclarationLineFromNode($node): string + public function getDeclarationLineFromNode($node, $symbolInformation, $type): string { + if ($symbolInformation !== null) { + if ($symbolInformation->kind === SymbolKind::VARIABLE) { + $defLine = 'var '; + if ($type !== null) { + $defLine .= (string)$type . ' '; + } + $defLine .= '$' . $symbolInformation->name; + return $defLine; + } elseif ($symbolInformation->kind === SymbolKind::CONSTANT) { + $defLine = 'const '; + if ($type !== null) { + $defLine .= (string)$type . ' '; + } + $defLine .= $symbolInformation->name; + return $defLine; + } elseif ($symbolInformation->kind === SymbolKind::INTERFACE) { + $defLine = 'interface '; + $defLine .= $symbolInformation->name; + + $namespaceNode = $node->getNamespaceDefinition(); + if ($namespaceNode !== null) { + $defLine = $namespaceNode->getText() . "\n\n" . $defLine; + } + return $defLine; + } elseif ($symbolInformation->kind === SymbolKind::PROPERTY) { + $defLine = 'property '; + if ($type !== null) { + $defLine .= (string)$type . ' '; + } + $defLine .= '$' . $symbolInformation->name; + return $defLine; + } + } // If node is part of a declaration list, build a declaration line that discludes other elements in the list // - [PropertyDeclaration] // public $a, [$b = 3], $c; => public $b = 3; // - [ConstDeclaration|ClassConstDeclaration] // "const A = 3, [B = 4];" => "const B = 4;" @@ -86,6 +122,22 @@ public function getDeclarationLineFromNode($node): string // cut at body start and replace all newlines $defLine = \str_replace(["\n", "\r"], " ", \strtok($defLine, "{")); $defLine = \preg_replace('!\s+!', " ", \trim($defLine)); + + if ($node instanceof Node\MethodDeclaration) { + $classNode = $node->getFirstAncestor(Node\Statement\ClassDeclaration::class, Node\Statement\InterfaceDeclaration::class, Node\Statement\TraitDeclaration::class); + if ($classNode !== null) { + $fqn = (string)$classNode->getNamespacedName(); + if ($fqn) { + $defLine = str_replace('function ', 'function ' . $fqn . '::', $defLine); + } + } + } + } elseif ($node instanceof Node\Statement\ClassDeclaration) { + $defLine = \rtrim(\strtok($defLine, "\n"), "\r"); + $namespaceNode = $node->getNamespaceDefinition(); + if ($namespaceNode !== null) { + $defLine = $namespaceNode->getText() . "\n\n" . $defLine; + } } else { // Trim string to only include first line $defLine = \rtrim(\strtok($defLine, "\n"), "\r"); @@ -250,11 +302,13 @@ public function createDefinitionFromNode(Node $node, string $fqn = null): Defini } } + // TODO add also @method doc entries + $def->symbolInformation = SymbolInformationFactory::fromNode($node, $fqn); if ($def->symbolInformation !== null) { $def->type = $this->getTypeFromNode($node); - $def->declarationLine = $this->getDeclarationLineFromNode($node); + $def->declarationLine = $this->getDeclarationLineFromNode($node, $def->symbolInformation, $def->type); $def->documentation = $this->getDocumentationFromNode($node); } @@ -719,6 +773,15 @@ private static function isVariableDeclaration(Node $n, string $name) return true; } + if ( + $n instanceof Node\Expression\Variable && + $n->getName() === $name && + $n->parent != null && $n->parent->parent != null && + $n->parent->parent->parent instanceof Node\Expression\ListIntrinsicExpression + ) { + return true; + } + return false; } @@ -1329,6 +1392,16 @@ public function getTypeFromNode($node) return new Types\Mixed_(); } + // LIST DECLARATION + if ( + $node instanceof Node\Expression\Variable && + $node->parent != null && $node->parent->parent != null && + $node->parent->parent->parent instanceof Node\Expression\ListIntrinsicExpression + ) { + // TODO implement actual list type from right side assignment + return new Types\Mixed_(); + } + // PROPERTIES, CONSTS, CLASS CONSTS, ASSIGNMENT EXPRESSIONS // Get the documented type the assignment resolves to. if ( diff --git a/src/Factory/SymbolInformationFactory.php b/src/Factory/SymbolInformationFactory.php index b9bebfd1..587030f0 100644 --- a/src/Factory/SymbolInformationFactory.php +++ b/src/Factory/SymbolInformationFactory.php @@ -60,6 +60,7 @@ public static function fromNode($node, string $fqn = null) ) || $node instanceof Node\UseVariableName || $node instanceof Node\Parameter + || $node->parent->parent->parent instanceof Node\Expression\ListIntrinsicExpression ) { $symbol->kind = SymbolKind::VARIABLE; } else { diff --git a/src/Server/TextDocument.php b/src/Server/TextDocument.php index c34e701d..17d4d8c1 100644 --- a/src/Server/TextDocument.php +++ b/src/Server/TextDocument.php @@ -14,12 +14,14 @@ Hover, Location, MarkedString, + MarkupContent, Position, Range, ReferenceContext, SymbolDescriptor, PackageDescriptor, SymbolLocationInformation, + SymbolKind, TextDocumentIdentifier, TextDocumentItem, VersionedTextDocumentIdentifier, @@ -348,6 +350,15 @@ public function hover(TextDocumentIdentifier $textDocument, Position $position): if ($def->documentation) { $contents[] = $def->documentation; } + if ($def->signatureInformation && $def->signatureInformation->parameters) { + $contents[] = new MarkedString('markdown', implode("\n", array_map(function (\LanguageServerProtocol\ParameterInformation $p) { + return "@param {$p->label}" . ($p->documentation ? " {$p->documentation}" : ''); + }, $def->signatureInformation->parameters))); + } + $type_kind = $def->symbolInformation !== null && in_array($def->symbolInformation->kind, [SymbolKind::METHOD, SymbolKind::FUNCTION]) ? "@return" : "@type"; + if ($def->type) { + $contents[] = new MarkedString('markdown', $type_kind . " " . (string)$def->type); + } return new Hover($contents, $range); }); } diff --git a/tests/Validation/cases/WithReturnTypehints.php.expected.json b/tests/Validation/cases/WithReturnTypehints.php.expected.json index 826ca212..d3a15e85 100644 --- a/tests/Validation/cases/WithReturnTypehints.php.expected.json +++ b/tests/Validation/cases/WithReturnTypehints.php.expected.json @@ -52,7 +52,7 @@ "containerName": "Fixtures\\Prophecy" }, "type": null, - "declarationLine": "class WithReturnTypehints extends EmptyClass", + "declarationLine": "namespace Fixtures\\Prophecy;\n\nclass WithReturnTypehints extends EmptyClass", "documentation": null, "signatureInformation": null }, @@ -73,7 +73,7 @@ }, "type__tostring": "\\Fixtures\\Prophecy\\WithReturnTypehints", "type": {}, - "declarationLine": "public function getSelf(): self", + "declarationLine": "public function Fixtures\\Prophecy\\WithReturnTypehints::getSelf(): self", "documentation": null, "signatureInformation": { "label": "()", @@ -97,7 +97,7 @@ }, "type__tostring": "string", "type": {}, - "declarationLine": "public function getName(): string", + "declarationLine": "public function Fixtures\\Prophecy\\WithReturnTypehints::getName(): string", "documentation": null, "signatureInformation": { "label": "()", @@ -121,7 +121,7 @@ }, "type__tostring": "\\Fixtures\\Prophecy\\EmptyClass", "type": {}, - "declarationLine": "public function getParent(): parent", + "declarationLine": "public function Fixtures\\Prophecy\\WithReturnTypehints::getParent(): parent", "documentation": null, "signatureInformation": { "label": "()", @@ -145,7 +145,7 @@ }, "type__tostring": "static", "type": {}, - "declarationLine": "public function getStatic(): static", + "declarationLine": "public function Fixtures\\Prophecy\\WithReturnTypehints::getStatic(): static", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json b/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json index 84534a47..f71ede95 100644 --- a/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json +++ b/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json @@ -38,7 +38,7 @@ }, "type__tostring": "array", "type": {}, - "declarationLine": "protected $foo;", + "declarationLine": "property array $foo", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/classDefinition1.php.expected.json b/tests/Validation/cases/classDefinition1.php.expected.json index 211a12fb..9926dd92 100644 --- a/tests/Validation/cases/classDefinition1.php.expected.json +++ b/tests/Validation/cases/classDefinition1.php.expected.json @@ -44,7 +44,7 @@ "containerName": "TestNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace TestNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "int", "type": {}, - "declarationLine": "public $a;", + "declarationLine": "property int $a", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/classProperty1.php.expected.json b/tests/Validation/cases/classProperty1.php.expected.json index 8bf25ed2..8717bae1 100644 --- a/tests/Validation/cases/classProperty1.php.expected.json +++ b/tests/Validation/cases/classProperty1.php.expected.json @@ -44,7 +44,7 @@ "containerName": "TestNamespace" }, "type": null, - "declarationLine": "class TestClass", + "declarationLine": "namespace TestNamespace;\n\nclass TestClass", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public $testProperty;", + "declarationLine": "property mixed $testProperty", "documentation": null, "signatureInformation": null }, @@ -86,7 +86,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function testMethod($testParameter)", + "declarationLine": "public function TestNamespace\\TestClass::testMethod($testParameter)", "documentation": null, "signatureInformation": { "label": "(mixed $testParameter)", diff --git a/tests/Validation/cases/constants.php.expected.json b/tests/Validation/cases/constants.php.expected.json index 6891fc2d..cadf892c 100644 --- a/tests/Validation/cases/constants.php.expected.json +++ b/tests/Validation/cases/constants.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A", + "declarationLine": "namespace MyNamespace;\n\nclass A", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public static function suite()", + "declarationLine": "public static function MyNamespace\\A::suite()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/constants2.php.expected.json b/tests/Validation/cases/constants2.php.expected.json index 7ace5bb9..243997b0 100644 --- a/tests/Validation/cases/constants2.php.expected.json +++ b/tests/Validation/cases/constants2.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A", + "declarationLine": "namespace MyNamespace;\n\nclass A", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public static function suite()", + "declarationLine": "public static function MyNamespace\\A::suite()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/constants3.php.expected.json b/tests/Validation/cases/constants3.php.expected.json index 05855ed1..b03887b4 100644 --- a/tests/Validation/cases/constants3.php.expected.json +++ b/tests/Validation/cases/constants3.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A", + "declarationLine": "namespace MyNamespace;\n\nclass A", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public static function suite()", + "declarationLine": "public static function MyNamespace\\A::suite()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/constants4.php.expected.json b/tests/Validation/cases/constants4.php.expected.json index 4e353c67..326c9c32 100644 --- a/tests/Validation/cases/constants4.php.expected.json +++ b/tests/Validation/cases/constants4.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A", + "declarationLine": "namespace MyNamespace;\n\nclass A", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function suite()", + "declarationLine": "public function MyNamespace\\A::suite()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/constants5.php.expected.json b/tests/Validation/cases/constants5.php.expected.json index 6b930433..fc8057b2 100644 --- a/tests/Validation/cases/constants5.php.expected.json +++ b/tests/Validation/cases/constants5.php.expected.json @@ -41,7 +41,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class Mbstring", + "declarationLine": "namespace MyNamespace;\n\nclass Mbstring", "documentation": null, "signatureInformation": null }, @@ -62,7 +62,7 @@ }, "type__tostring": "\\MyNamespace\\PHP_INT_MAX", "type": {}, - "declarationLine": "const MB_CASE_FOLD = PHP_INT_MAX;", + "declarationLine": "const \\MyNamespace\\PHP_INT_MAX MB_CASE_FOLD", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json b/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json index ba5da458..4241b37b 100644 --- a/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json +++ b/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json @@ -21,7 +21,7 @@ "containerName": "" }, "type": null, - "declarationLine": "interface A {", + "declarationLine": "interface A", "documentation": null, "signatureInformation": null }, @@ -42,7 +42,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b ($a = MY_CONSTANT);", + "declarationLine": "function A::b ($a = MY_CONSTANT);", "documentation": null, "signatureInformation": { "label": "(\\MY_CONSTANT $a = MY_CONSTANT)", diff --git a/tests/Validation/cases/interfaceProperty.php.expected.json b/tests/Validation/cases/interfaceProperty.php.expected.json index d22d0280..73779857 100644 --- a/tests/Validation/cases/interfaceProperty.php.expected.json +++ b/tests/Validation/cases/interfaceProperty.php.expected.json @@ -17,7 +17,7 @@ "containerName": "" }, "type": null, - "declarationLine": "interface A {", + "declarationLine": "interface A", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/magicConsts.php.expected.json b/tests/Validation/cases/magicConsts.php.expected.json index a45a72a8..c6698414 100644 --- a/tests/Validation/cases/magicConsts.php.expected.json +++ b/tests/Validation/cases/magicConsts.php.expected.json @@ -42,7 +42,7 @@ }, "type__tostring": "array<\\__CLASS__,bool>", "type": {}, - "declarationLine": "private static $deprecationsTriggered;", + "declarationLine": "property array<\\__CLASS__,bool> $deprecationsTriggered", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/memberAccess1.php.expected.json b/tests/Validation/cases/memberAccess1.php.expected.json index eccb0548..18a8054f 100644 --- a/tests/Validation/cases/memberAccess1.php.expected.json +++ b/tests/Validation/cases/memberAccess1.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "static function a()", + "declarationLine": "static function MyNamespace\\A::a()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/memberAccess2.php.expected.json b/tests/Validation/cases/memberAccess2.php.expected.json index ad0c4ba5..ea2a0314 100644 --- a/tests/Validation/cases/memberAccess2.php.expected.json +++ b/tests/Validation/cases/memberAccess2.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "static function a()", + "declarationLine": "static function MyNamespace\\A::a()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/memberAccess3.php.expected.json b/tests/Validation/cases/memberAccess3.php.expected.json index 8d6c17c0..c3c99b24 100644 --- a/tests/Validation/cases/memberAccess3.php.expected.json +++ b/tests/Validation/cases/memberAccess3.php.expected.json @@ -59,7 +59,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -80,7 +80,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public static function getInitializer(ClassLoader $loader)", + "declarationLine": "public static function MyNamespace\\A::getInitializer(ClassLoader $loader)", "documentation": null, "signatureInformation": { "label": "(\\MyNamespace\\ClassLoader $loader)", diff --git a/tests/Validation/cases/memberAccess4.php.expected.json b/tests/Validation/cases/memberAccess4.php.expected.json index c657180f..cb214aa1 100644 --- a/tests/Validation/cases/memberAccess4.php.expected.json +++ b/tests/Validation/cases/memberAccess4.php.expected.json @@ -50,7 +50,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -71,7 +71,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function testRequest()", + "declarationLine": "public function MyNamespace\\A::testRequest()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/memberAccess5.php.expected.json b/tests/Validation/cases/memberAccess5.php.expected.json index b843ba6c..eb202cdb 100644 --- a/tests/Validation/cases/memberAccess5.php.expected.json +++ b/tests/Validation/cases/memberAccess5.php.expected.json @@ -41,7 +41,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class ParseErrorsTest {", + "declarationLine": "namespace MyNamespace;\n\nclass ParseErrorsTest {", "documentation": null, "signatureInformation": null }, @@ -62,7 +62,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function setUp()", + "declarationLine": "public function MyNamespace\\ParseErrorsTest::setUp()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/memberCall1.php.expected.json b/tests/Validation/cases/memberCall1.php.expected.json index 4ab1adb1..57d14764 100644 --- a/tests/Validation/cases/memberCall1.php.expected.json +++ b/tests/Validation/cases/memberCall1.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class ParseErrorsTest", + "declarationLine": "namespace MyNamespace;\n\nclass ParseErrorsTest", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function setAccount(AccountInterface $account)", + "declarationLine": "public function MyNamespace\\ParseErrorsTest::setAccount(AccountInterface $account)", "documentation": null, "signatureInformation": { "label": "(\\MyNamespace\\AccountInterface $account)", diff --git a/tests/Validation/cases/methodReturnType.php.expected.json b/tests/Validation/cases/methodReturnType.php.expected.json index 42b561e6..b84d81c4 100644 --- a/tests/Validation/cases/methodReturnType.php.expected.json +++ b/tests/Validation/cases/methodReturnType.php.expected.json @@ -47,7 +47,7 @@ }, "type__tostring": "\\FooClass", "type": {}, - "declarationLine": "public function foo(): FooClass", + "declarationLine": "public function FooClass::foo(): FooClass", "documentation": null, "signatureInformation": { "label": "()", @@ -71,7 +71,7 @@ }, "type__tostring": "\\FooClass", "type": {}, - "declarationLine": "public function bar()", + "declarationLine": "public function FooClass::bar()", "documentation": "", "signatureInformation": { "label": "()", @@ -96,7 +96,7 @@ }, "type__tostring": "static", "type": {}, - "declarationLine": "public function baz()", + "declarationLine": "public function FooClass::baz()", "documentation": "", "signatureInformation": { "label": "()", @@ -121,7 +121,7 @@ }, "type__tostring": "\\EmptyClass", "type": {}, - "declarationLine": "public function buz()", + "declarationLine": "public function FooClass::buz()", "documentation": "", "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/multipleNamespaces.php.expected.json b/tests/Validation/cases/multipleNamespaces.php.expected.json index 4d327334..95bf0004 100644 --- a/tests/Validation/cases/multipleNamespaces.php.expected.json +++ b/tests/Validation/cases/multipleNamespaces.php.expected.json @@ -50,7 +50,7 @@ "containerName": "MyNamespace1" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace1;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -71,7 +71,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace1\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -116,7 +116,7 @@ "containerName": "MyNamespace2" }, "type": null, - "declarationLine": "class A extends MyNamespace1\\B {", + "declarationLine": "namespace MyNamespace2;\n\nclass A extends MyNamespace1\\B {", "documentation": null, "signatureInformation": null }, @@ -137,7 +137,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace2\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/multiplePreceedingComments.php.expected.json b/tests/Validation/cases/multiplePreceedingComments.php.expected.json index 2bca2b66..ce0013f7 100644 --- a/tests/Validation/cases/multiplePreceedingComments.php.expected.json +++ b/tests/Validation/cases/multiplePreceedingComments.php.expected.json @@ -38,7 +38,7 @@ }, "type__tostring": "\\Iterator", "type": {}, - "declarationLine": "public function fn()", + "declarationLine": "public function Foo::fn()", "documentation": "Foo", "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/nameToken.php.expected.json b/tests/Validation/cases/nameToken.php.expected.json index 20dae9d7..b3367cdd 100644 --- a/tests/Validation/cases/nameToken.php.expected.json +++ b/tests/Validation/cases/nameToken.php.expected.json @@ -42,7 +42,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function A::b()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/objectCreation.php.expected.json b/tests/Validation/cases/objectCreation.php.expected.json index b2a6f593..c090e804 100644 --- a/tests/Validation/cases/objectCreation.php.expected.json +++ b/tests/Validation/cases/objectCreation.php.expected.json @@ -41,7 +41,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -62,7 +62,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/objectCreation2.php.expected.json b/tests/Validation/cases/objectCreation2.php.expected.json index 0bef6c2f..99aceb1d 100644 --- a/tests/Validation/cases/objectCreation2.php.expected.json +++ b/tests/Validation/cases/objectCreation2.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -64,7 +64,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -85,7 +85,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/objectCreation3.php.expected.json b/tests/Validation/cases/objectCreation3.php.expected.json index ba22651f..80a3f22b 100644 --- a/tests/Validation/cases/objectCreation3.php.expected.json +++ b/tests/Validation/cases/objectCreation3.php.expected.json @@ -42,7 +42,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/parent1.php.expected.json b/tests/Validation/cases/parent1.php.expected.json index 237471fd..5c5e3a87 100644 --- a/tests/Validation/cases/parent1.php.expected.json +++ b/tests/Validation/cases/parent1.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -90,7 +90,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -111,7 +111,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/parent3.php.expected.json b/tests/Validation/cases/parent3.php.expected.json index 37bc31ca..d283390f 100644 --- a/tests/Validation/cases/parent3.php.expected.json +++ b/tests/Validation/cases/parent3.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -90,7 +90,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -111,7 +111,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/promotedConstructor.php.expected.json b/tests/Validation/cases/promotedConstructor.php.expected.json index 60568251..328a5da4 100644 --- a/tests/Validation/cases/promotedConstructor.php.expected.json +++ b/tests/Validation/cases/promotedConstructor.php.expected.json @@ -37,7 +37,7 @@ "containerName": "TestNamespace8" }, "type": null, - "declarationLine": "class PromotedProperties {", + "declarationLine": "namespace TestNamespace8;\n\nclass PromotedProperties {", "documentation": null, "signatureInformation": null }, @@ -58,7 +58,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function __construct( public $untyped, public string $name = 'Damjan', )", + "declarationLine": "public function TestNamespace8\\PromotedProperties::__construct( public $untyped, public string $name = 'Damjan', )", "documentation": null, "signatureInformation": { "label": "(mixed $untyped, string $name = 'Damjan')", @@ -89,7 +89,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public $untyped", + "declarationLine": "property mixed $untyped", "documentation": null, "signatureInformation": null }, @@ -110,7 +110,7 @@ }, "type__tostring": "string", "type": {}, - "declarationLine": "public string $name = 'Damjan'", + "declarationLine": "property string $name", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/propertyName1.php.expected.json b/tests/Validation/cases/propertyName1.php.expected.json index d43cabfd..88ca0fe5 100644 --- a/tests/Validation/cases/propertyName1.php.expected.json +++ b/tests/Validation/cases/propertyName1.php.expected.json @@ -38,7 +38,7 @@ }, "type__tostring": "string", "type": {}, - "declarationLine": "protected $mainPropertyName;", + "declarationLine": "property string $mainPropertyName", "documentation": "The name of the main property, or NULL if there is none.", "signatureInformation": null } diff --git a/tests/Validation/cases/propertyName2.php.expected.json b/tests/Validation/cases/propertyName2.php.expected.json index 4b5bd9b2..f49f0e87 100644 --- a/tests/Validation/cases/propertyName2.php.expected.json +++ b/tests/Validation/cases/propertyName2.php.expected.json @@ -38,7 +38,7 @@ }, "type__tostring": "string", "type": {}, - "declarationLine": "protected $mainPropertyName;", + "declarationLine": "property string $mainPropertyName", "documentation": "The name of the main property, or NULL if there is none.", "signatureInformation": null } diff --git a/tests/Validation/cases/scopedPropertyAccess.php.expected.json b/tests/Validation/cases/scopedPropertyAccess.php.expected.json index 3667fe2d..1411c569 100644 --- a/tests/Validation/cases/scopedPropertyAccess.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess.php.expected.json @@ -44,7 +44,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A {", + "declarationLine": "namespace MyNamespace;\n\nclass A {", "documentation": null, "signatureInformation": null }, @@ -65,7 +65,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "static function a()", + "declarationLine": "static function MyNamespace\\A::a()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/scopedPropertyAccess3.php.expected.json b/tests/Validation/cases/scopedPropertyAccess3.php.expected.json index 54ca5f18..88ad7876 100644 --- a/tests/Validation/cases/scopedPropertyAccess3.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess3.php.expected.json @@ -45,7 +45,7 @@ }, "type__tostring": "string", "type": {}, - "declarationLine": "static $a;", + "declarationLine": "property string $a", "documentation": null, "signatureInformation": null } diff --git a/tests/Validation/cases/scopedPropertyAccess5.php.expected.json b/tests/Validation/cases/scopedPropertyAccess5.php.expected.json index ee944edc..30bfc14f 100644 --- a/tests/Validation/cases/scopedPropertyAccess5.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess5.php.expected.json @@ -51,7 +51,7 @@ }, "type__tostring": "\\TestClass[]", "type": {}, - "declarationLine": "public static $testProperty;", + "declarationLine": "property \\TestClass[] $testProperty", "documentation": "Lorem excepteur officia sit anim velit veniam enim.", "signatureInformation": null } diff --git a/tests/Validation/cases/self1.php.expected.json b/tests/Validation/cases/self1.php.expected.json index f2f633bf..587ccc69 100644 --- a/tests/Validation/cases/self1.php.expected.json +++ b/tests/Validation/cases/self1.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -93,7 +93,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -114,7 +114,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/self2.php.expected.json b/tests/Validation/cases/self2.php.expected.json index 8a3e8ddc..f8d45ef9 100644 --- a/tests/Validation/cases/self2.php.expected.json +++ b/tests/Validation/cases/self2.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -93,7 +93,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -114,7 +114,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/self3.php.expected.json b/tests/Validation/cases/self3.php.expected.json index 91c65f0b..9e6dc044 100644 --- a/tests/Validation/cases/self3.php.expected.json +++ b/tests/Validation/cases/self3.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -93,7 +93,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -114,7 +114,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/self4.php.expected.json b/tests/Validation/cases/self4.php.expected.json index 7d4df40f..a67176e6 100644 --- a/tests/Validation/cases/self4.php.expected.json +++ b/tests/Validation/cases/self4.php.expected.json @@ -56,7 +56,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A", + "declarationLine": "namespace MyNamespace;\n\nclass A", "documentation": null, "signatureInformation": null }, @@ -77,7 +77,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public static function suite()", + "declarationLine": "public static function MyNamespace\\A::suite()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/self5.php.expected.json b/tests/Validation/cases/self5.php.expected.json index 89fe2979..511ab204 100644 --- a/tests/Validation/cases/self5.php.expected.json +++ b/tests/Validation/cases/self5.php.expected.json @@ -41,7 +41,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A", + "declarationLine": "namespace MyNamespace;\n\nclass A", "documentation": null, "signatureInformation": null }, @@ -62,7 +62,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function typesProvider()", + "declarationLine": "public function MyNamespace\\A::typesProvider()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/static1.php.expected.json b/tests/Validation/cases/static1.php.expected.json index 577f8608..d5e3ad71 100644 --- a/tests/Validation/cases/static1.php.expected.json +++ b/tests/Validation/cases/static1.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -93,7 +93,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -114,7 +114,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/static2.php.expected.json b/tests/Validation/cases/static2.php.expected.json index 1511d466..174de76b 100644 --- a/tests/Validation/cases/static2.php.expected.json +++ b/tests/Validation/cases/static2.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -93,7 +93,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -114,7 +114,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/static3.php.expected.json b/tests/Validation/cases/static3.php.expected.json index 1f1c2599..6dbf78ab 100644 --- a/tests/Validation/cases/static3.php.expected.json +++ b/tests/Validation/cases/static3.php.expected.json @@ -47,7 +47,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class B {", + "declarationLine": "namespace MyNamespace;\n\nclass B {", "documentation": null, "signatureInformation": null }, @@ -68,7 +68,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function b()", + "declarationLine": "function MyNamespace\\B::b()", "documentation": null, "signatureInformation": { "label": "()", @@ -93,7 +93,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -114,7 +114,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/static4.php.expected.json b/tests/Validation/cases/static4.php.expected.json index 211e4dbb..0a41119c 100644 --- a/tests/Validation/cases/static4.php.expected.json +++ b/tests/Validation/cases/static4.php.expected.json @@ -46,7 +46,7 @@ "containerName": "MyNamespace" }, "type": null, - "declarationLine": "class A extends B {", + "declarationLine": "namespace MyNamespace;\n\nclass A extends B {", "documentation": null, "signatureInformation": null }, @@ -67,7 +67,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function MyNamespace\\A::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/staticMethodReturnType.php.expected.json b/tests/Validation/cases/staticMethodReturnType.php.expected.json index f2779151..41687bd4 100644 --- a/tests/Validation/cases/staticMethodReturnType.php.expected.json +++ b/tests/Validation/cases/staticMethodReturnType.php.expected.json @@ -42,7 +42,7 @@ }, "type__tostring": "\\FooClass", "type": {}, - "declarationLine": "public static function staticFoo(): FooClass", + "declarationLine": "public static function FooClass::staticFoo(): FooClass", "documentation": null, "signatureInformation": { "label": "()", @@ -66,7 +66,7 @@ }, "type__tostring": "\\FooClass", "type": {}, - "declarationLine": "public static function staticSelf(): self", + "declarationLine": "public static function FooClass::staticSelf(): self", "documentation": null, "signatureInformation": { "label": "()", @@ -90,7 +90,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function bar()", + "declarationLine": "public function FooClass::bar()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/stringVariable.php.expected.json b/tests/Validation/cases/stringVariable.php.expected.json index b4b68f2a..3b48947b 100644 --- a/tests/Validation/cases/stringVariable.php.expected.json +++ b/tests/Validation/cases/stringVariable.php.expected.json @@ -42,7 +42,7 @@ }, "type__tostring": "int", "type": {}, - "declarationLine": "public $hi;", + "declarationLine": "property int $hi", "documentation": null, "signatureInformation": null }, @@ -63,7 +63,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "function a ()", + "declarationLine": "function B::a ()", "documentation": null, "signatureInformation": { "label": "()", diff --git a/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json b/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json index f22d8678..c71ebebf 100644 --- a/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json +++ b/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json @@ -45,7 +45,7 @@ }, "type__tostring": "\\", "type": {}, - "declarationLine": "protected $bar;", + "declarationLine": "property \\ $bar", "documentation": null, "signatureInformation": null }, @@ -66,7 +66,7 @@ }, "type__tostring": "mixed", "type": {}, - "declarationLine": "public function foo ()", + "declarationLine": "public function Foo::foo ()", "documentation": null, "signatureInformation": { "label": "()",