From a40cf731f791788c9179d6771cb59f47122994ad Mon Sep 17 00:00:00 2001 From: phil-nelson Date: Sun, 10 Dec 2017 16:10:43 +1100 Subject: [PATCH] feat: Signature help (#547) closes #18 --- fixtures/signature_help/calls.php | 66 ++++++ src/Definition.php | 7 + src/DefinitionResolver.php | 13 ++ src/LanguageServer.php | 7 +- src/Protocol/ParameterInformation.php | 13 ++ src/Protocol/SignatureHelp.php | 14 ++ src/Protocol/SignatureInformation.php | 15 ++ src/Server/TextDocument.php | 25 ++- src/SignatureHelpProvider.php | 189 +++++++++++++++++ src/SignatureInformationFactory.php | 91 ++++++++ tests/LanguageServerTest.php | 5 +- .../Server/TextDocument/SignatureHelpTest.php | 199 ++++++++++++++++++ .../WithReturnTypehints.php.expected.json | 27 ++- ...embersShouldNotBeSymbols.php.expected.json | 3 +- ...rrayValueShouldBeBoolean.php.expected.json | 6 +- .../cases/caseStatement1.php.expected.json | 3 +- .../cases/classDefinition1.php.expected.json | 9 +- .../cases/classProperty1.php.expected.json | 21 +- .../cases/constants.php.expected.json | 13 +- .../cases/constants2.php.expected.json | 13 +- .../cases/constants3.php.expected.json | 13 +- .../cases/constants4.php.expected.json | 13 +- .../cases/constants5.php.expected.json | 9 +- ...tsInFunctionParamDefault.php.expected.json | 15 +- ...cksOnNamespaceDefinition.php.expected.json | 3 +- .../cases/exceptions1.php.expected.json | 3 +- .../cases/ifStatement1.php.expected.json | 3 +- .../cases/interfaceProperty.php.expected.json | 3 +- ...cConstantsShouldBeGlobal.php.expected.json | 3 +- .../cases/magicConsts.php.expected.json | 6 +- .../cases/memberAccess1.php.expected.json | 13 +- .../cases/memberAccess2.php.expected.json | 13 +- .../cases/memberAccess3.php.expected.json | 18 +- .../cases/memberAccess4.php.expected.json | 13 +- .../cases/memberAccess5.php.expected.json | 13 +- .../cases/memberCall1.php.expected.json | 18 +- .../cases/methodReturnType.php.expected.json | 10 +- .../multipleNamespaces.php.expected.json | 26 ++- ...ltiplePreceedingComments.php.expected.json | 10 +- .../cases/nameToken.php.expected.json | 10 +- .../cases/namespaces2.php.expected.json | 3 +- .../cases/namespaces5.php.expected.json | 3 +- .../cases/namespaces6.php.expected.json | 3 +- .../cases/namespaces8.php.expected.json | 3 +- .../cases/objectCreation.php.expected.json | 13 +- .../cases/objectCreation2.php.expected.json | 16 +- .../cases/objectCreation3.php.expected.json | 10 +- .../Validation/cases/param1.php.expected.json | 15 +- .../cases/parent1.php.expected.json | 23 +- .../cases/parent3.php.expected.json | 23 +- .../cases/propertyName1.php.expected.json | 6 +- .../cases/propertyName2.php.expected.json | 6 +- .../cases/returnType.php.expected.json | 15 +- .../scopedPropertyAccess.php.expected.json | 13 +- .../scopedPropertyAccess2.php.expected.json | 3 +- .../scopedPropertyAccess3.php.expected.json | 6 +- .../scopedPropertyAccess5.php.expected.json | 6 +- .../Validation/cases/self1.php.expected.json | 23 +- .../Validation/cases/self2.php.expected.json | 23 +- .../Validation/cases/self3.php.expected.json | 23 +- .../Validation/cases/self4.php.expected.json | 13 +- .../Validation/cases/self5.php.expected.json | 13 +- .../cases/static1.php.expected.json | 23 +- .../cases/static2.php.expected.json | 23 +- .../cases/static3.php.expected.json | 23 +- .../cases/static4.php.expected.json | 13 +- .../staticMethodReturnType.php.expected.json | 17 +- .../cases/stringVariable.php.expected.json | 13 +- ...edNameOutsideOfNamespace.php.expected.json | 3 +- ...rifyFqsenOnClassProperty.php.expected.json | 13 +- 70 files changed, 1183 insertions(+), 161 deletions(-) create mode 100644 fixtures/signature_help/calls.php create mode 100644 src/SignatureHelpProvider.php create mode 100644 src/SignatureInformationFactory.php create mode 100644 tests/Server/TextDocument/SignatureHelpTest.php diff --git a/fixtures/signature_help/calls.php b/fixtures/signature_help/calls.php new file mode 100644 index 0000000..312b4d2 --- /dev/null +++ b/fixtures/signature_help/calls.php @@ -0,0 +1,66 @@ +foo(); +$t->foo(1, +$t->foo(1,); +$t->baz(); + +foo( + 1, + foo(1, 2, +); + +Test::bar(); + +new $foo(); +new $foo(1, ); + +new NotExist(); diff --git a/src/Definition.php b/src/Definition.php index c27f871..0d157cb 100644 --- a/src/Definition.php +++ b/src/Definition.php @@ -99,6 +99,13 @@ class Definition */ public $documentation; + /** + * Signature information if this definition is for a FunctionLike, for use in textDocument/signatureHelp + * + * @var SignatureInformation + */ + public $signatureInformation; + /** * Yields the definitons of all ancestor classes (the Definition fqn is yielded as key) * diff --git a/src/DefinitionResolver.php b/src/DefinitionResolver.php index c9d1400..2c1f67d 100644 --- a/src/DefinitionResolver.php +++ b/src/DefinitionResolver.php @@ -7,6 +7,7 @@ use LanguageServer\Index\ReadableIndex; use LanguageServer\Protocol\SymbolInformation; use Microsoft\PhpParser; use Microsoft\PhpParser\Node; +use Microsoft\PhpParser\FunctionLike; use phpDocumentor\Reflection\{ DocBlock, DocBlockFactory, Fqsen, Type, TypeResolver, Types }; @@ -34,6 +35,13 @@ class DefinitionResolver */ private $docBlockFactory; + /** + * Creates SignatureInformation + * + * @var SignatureInformationFactory + */ + private $signatureInformationFactory; + /** * @param ReadableIndex $index */ @@ -42,6 +50,7 @@ class DefinitionResolver $this->index = $index; $this->typeResolver = new TypeResolver; $this->docBlockFactory = DocBlockFactory::createInstance(); + $this->signatureInformationFactory = new SignatureInformationFactory($this); } /** @@ -232,6 +241,10 @@ class DefinitionResolver $def->documentation = $this->getDocumentationFromNode($node); } + if ($node instanceof FunctionLike) { + $def->signatureInformation = $this->signatureInformationFactory->create($node); + } + return $def; } diff --git a/src/LanguageServer.php b/src/LanguageServer.php index 73560f4..46281f5 100644 --- a/src/LanguageServer.php +++ b/src/LanguageServer.php @@ -9,7 +9,8 @@ use LanguageServer\Protocol\{ TextDocumentSyncKind, Message, InitializeResult, - CompletionOptions + CompletionOptions, + SignatureHelpOptions }; use LanguageServer\FilesFinder\{FilesFinder, ClientFilesFinder, FileSystemFilesFinder}; use LanguageServer\ContentRetriever\{ContentRetriever, ClientContentRetriever, FileSystemContentRetriever}; @@ -275,6 +276,10 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher $serverCapabilities->completionProvider = new CompletionOptions; $serverCapabilities->completionProvider->resolveProvider = false; $serverCapabilities->completionProvider->triggerCharacters = ['$', '>']; + + $serverCapabilities->signatureHelpProvider = new SignatureHelpOptions(); + $serverCapabilities->signatureHelpProvider->triggerCharacters = ['(', ',']; + // Support global references $serverCapabilities->xworkspaceReferencesProvider = true; $serverCapabilities->xdefinitionProvider = true; diff --git a/src/Protocol/ParameterInformation.php b/src/Protocol/ParameterInformation.php index 89b5e53..fa9b7bf 100644 --- a/src/Protocol/ParameterInformation.php +++ b/src/Protocol/ParameterInformation.php @@ -23,4 +23,17 @@ class ParameterInformation * @var string|null */ public $documentation; + + /** + * Create ParameterInformation + * + * @param string $label The label of this signature. Will be shown in the UI. + * @param string $documentation The human-readable doc-comment of this signature. Will be shown in the UI but can + * be omitted. + */ + public function __construct(string $label, string $documentation = null) + { + $this->label = $label; + $this->documentation = $documentation; + } } diff --git a/src/Protocol/SignatureHelp.php b/src/Protocol/SignatureHelp.php index 407b25a..f7aec6f 100644 --- a/src/Protocol/SignatureHelp.php +++ b/src/Protocol/SignatureHelp.php @@ -29,4 +29,18 @@ class SignatureHelp * @var int|null */ public $activeParameter; + + /** + * Create a SignatureHelp + * + * @param SignatureInformation[] $signatures List of signature information + * @param int|null $activeSignature The active signature, zero based + * @param int|null $activeParameter The active parameter, zero based + */ + public function __construct(array $signatures = [], $activeSignature = null, int $activeParameter = null) + { + $this->signatures = $signatures; + $this->activeSignature = $activeSignature; + $this->activeParameter = $activeParameter; + } } diff --git a/src/Protocol/SignatureInformation.php b/src/Protocol/SignatureInformation.php index 77e152c..d545f65 100644 --- a/src/Protocol/SignatureInformation.php +++ b/src/Protocol/SignatureInformation.php @@ -31,4 +31,19 @@ class SignatureInformation * @var ParameterInformation[]|null */ public $parameters; + + /** + * Create a SignatureInformation + * + * @param string $label The label of this signature. Will be shown in the UI. + * @param ParameterInformation[]|null The parameters of this signature + * @param string|null The human-readable doc-comment of this signature. Will be shown in the UI + * but can be omitted. + */ + public function __construct(string $label, array $parameters = null, string $documentation = null) + { + $this->label = $label; + $this->parameters = $parameters; + $this->documentation = $documentation; + } } diff --git a/src/Server/TextDocument.php b/src/Server/TextDocument.php index 3209438..704ceb8 100644 --- a/src/Server/TextDocument.php +++ b/src/Server/TextDocument.php @@ -4,7 +4,7 @@ declare(strict_types = 1); namespace LanguageServer\Server; use LanguageServer\{ - CompletionProvider, LanguageClient, PhpDocument, PhpDocumentLoader, DefinitionResolver + CompletionProvider, SignatureHelpProvider, LanguageClient, PhpDocument, PhpDocumentLoader, DefinitionResolver }; use LanguageServer\Index\ReadableIndex; use LanguageServer\Protocol\{ @@ -59,6 +59,11 @@ class TextDocument */ protected $completionProvider; + /** + * @var SignatureHelpProvider + */ + protected $signatureHelpProvider; + /** * @var ReadableIndex */ @@ -94,6 +99,7 @@ class TextDocument $this->client = $client; $this->definitionResolver = $definitionResolver; $this->completionProvider = new CompletionProvider($this->definitionResolver, $index); + $this->signatureHelpProvider = new SignatureHelpProvider($this->definitionResolver, $index, $documentLoader); $this->index = $index; $this->composerJson = $composerJson; $this->composerLock = $composerLock; @@ -237,6 +243,23 @@ class TextDocument }); } + /** + * The signature help request is sent from the client to the server to request signature information at a given + * cursor position. + * + * @param TextDocumentIdentifier $textDocument The text document + * @param Position $position The position inside the text document + * + * @return Promise + */ + public function signatureHelp(TextDocumentIdentifier $textDocument, Position $position): Promise + { + return coroutine(function () use ($textDocument, $position) { + $document = yield $this->documentLoader->getOrLoad($textDocument->uri); + return $this->signatureHelpProvider->getSignatureHelp($document, $position); + }); + } + /** * The goto definition request is sent from the client to the server to resolve the definition location of a symbol * at a given text document position. diff --git a/src/SignatureHelpProvider.php b/src/SignatureHelpProvider.php new file mode 100644 index 0000000..aba02b4 --- /dev/null +++ b/src/SignatureHelpProvider.php @@ -0,0 +1,189 @@ +definitionResolver = $definitionResolver; + $this->index = $index; + $this->documentLoader = $documentLoader; + } + + /** + * Finds signature help for a callable position + * + * @param PhpDocument $doc The document the position belongs to + * @param Position $position The position to detect a call from + * + * @return Promise + */ + public function getSignatureHelp(PhpDocument $doc, Position $position): Promise + { + return coroutine(function () use ($doc, $position) { + // Find the node under the cursor + $node = $doc->getNodeAtPosition($position); + + // Find the definition of the item being called + list($def, $argumentExpressionList) = yield $this->getCallingInfo($node); + + if (!$def || !$def->signatureInformation) { + return new SignatureHelp(); + } + + // Find the active parameter + $activeParam = $argumentExpressionList + ? $this->findActiveParameter($argumentExpressionList, $position, $doc) + : 0; + + return new SignatureHelp([$def->signatureInformation], 0, $activeParam); + }); + } + + /** + * Given a node that could be a callable, finds the definition of the call and the argument expression list of + * the node + * + * @param Node $node The node to find calling information from + * + * @return Promise + */ + private function getCallingInfo(Node $node) + { + return coroutine(function () use ($node) { + $fqn = null; + $callingNode = null; + if ($node instanceof Node\DelimitedList\ArgumentExpressionList) { + // Cursor is already inside a ( + $argumentExpressionList = $node; + if ($node->parent instanceof Node\Expression\ObjectCreationExpression) { + // Constructing something + $callingNode = $node->parent->classTypeDesignator; + if (!$callingNode instanceof Node\QualifiedName) { + // We only support constructing from a QualifiedName + return null; + } + $fqn = $this->definitionResolver->resolveReferenceNodeToFqn($callingNode); + $fqn = "{$fqn}->__construct()"; + } else { + $callingNode = $node->parent->getFirstChildNode( + Node\Expression\MemberAccessExpression::class, + Node\Expression\ScopedPropertyAccessExpression::class, + Node\QualifiedName::class + ); + } + } elseif ($node instanceof Node\Expression\CallExpression) { + $argumentExpressionList = $node->getFirstChildNode(Node\DelimitedList\ArgumentExpressionList::class); + $callingNode = $node->getFirstChildNode( + Node\Expression\MemberAccessExpression::class, + Node\Expression\ScopedPropertyAccessExpression::class, + Node\QualifiedName::class + ); + } elseif ($node instanceof Node\Expression\ObjectCreationExpression) { + $argumentExpressionList = $node->getFirstChildNode(Node\DelimitedList\ArgumentExpressionList::class); + $callingNode = $node->classTypeDesignator; + if (!$callingNode instanceof Node\QualifiedName) { + // We only support constructing from a QualifiedName + return null; + } + // Manually build the __construct fqn + $fqn = $this->definitionResolver->resolveReferenceNodeToFqn($callingNode); + $fqn = "{$fqn}->__construct()"; + } + + if (!$callingNode) { + return null; + } + + // Now find the definition of the call + $fqn = $fqn ?: DefinitionResolver::getDefinedFqn($callingNode); + while (true) { + if ($fqn) { + $def = $this->index->getDefinition($fqn); + } else { + $def = $this->definitionResolver->resolveReferenceNodeToDefinition($callingNode); + } + if ($def !== null || $this->index->isComplete()) { + break; + } + yield waitForEvent($this->index, 'definition-added'); + } + + if (!$def) { + return null; + } + + return [$def, $argumentExpressionList]; + }); + } + + /** + * Given a position and arguments, finds the "active" argument at the position + * + * @param Node\DelimitedList\ArgumentExpressionList $argumentExpressionList The argument expression list + * @param Position $position The position to detect the active argument from + * @param PhpDocument $doc The document that contains the expression + * + * @return int + */ + private function findActiveParameter( + Node\DelimitedList\ArgumentExpressionList $argumentExpressionList, + Position $position, + PhpDocument $doc + ): int { + $args = $argumentExpressionList->children; + $i = 0; + $found = null; + foreach ($args as $arg) { + if ($arg instanceof Node) { + $start = $arg->getFullStart(); + $end = $arg->getEndPosition(); + } else { + $start = $arg->fullStart; + $end = $start + $arg->length; + } + $offset = $position->toOffset($doc->getContent()); + if ($offset >= $start && $offset <= $end) { + $found = $i; + break; + } + if ($arg instanceof Node) { + ++$i; + } + } + if ($found === null) { + $found = $i; + } + return $found; + } +} diff --git a/src/SignatureInformationFactory.php b/src/SignatureInformationFactory.php new file mode 100644 index 0000000..6b8a1f0 --- /dev/null +++ b/src/SignatureInformationFactory.php @@ -0,0 +1,91 @@ +definitionResolver = $definitionResolver; + } + + /** + * Create a SignatureInformation from a FunctionLike node + * + * @param FunctionLike $node Node to create signature information from + * + * @return SignatureInformation + */ + public function create(FunctionLike $node): SignatureInformation + { + $params = $this->createParameters($node); + $label = $this->createLabel($params); + return new SignatureInformation( + $label, + $params, + $this->definitionResolver->getDocumentationFromNode($node) + ); + } + + /** + * Gets parameters from a FunctionLike node + * + * @param FunctionLike $node Node to get parameters from + * + * @return ParameterInformation[] + */ + private function createParameters(FunctionLike $node): array + { + $params = []; + if ($node->parameters) { + foreach ($node->parameters->getElements() as $element) { + $param = (string) $this->definitionResolver->getTypeFromNode($element); + $param .= ' '; + if ($element->dotDotDotToken) { + $param .= '...'; + } + $param .= '$' . $element->getName(); + if ($element->default) { + $param .= ' = ' . $element->default->getText(); + } + $params[] = new ParameterInformation( + $param, + $this->definitionResolver->getDocumentationFromNode($element) + ); + } + } + return $params; + } + + /** + * Creates a signature information label from parameters + * + * @param ParameterInformation[] $params Parameters to create the label from + * + * @return string + */ + private function createLabel(array $params): string + { + $label = '('; + if ($params) { + foreach ($params as $param) { + $label .= $param->label . ', '; + } + $label = substr($label, 0, -2); + } + $label .= ')'; + return $label; + } +} diff --git a/tests/LanguageServerTest.php b/tests/LanguageServerTest.php index 5d58172..52963e6 100644 --- a/tests/LanguageServerTest.php +++ b/tests/LanguageServerTest.php @@ -14,7 +14,8 @@ use LanguageServer\Protocol\{ TextDocumentIdentifier, InitializeResult, ServerCapabilities, - CompletionOptions + CompletionOptions, + SignatureHelpOptions }; use AdvancedJsonRpc; use Webmozart\Glob\Glob; @@ -40,6 +41,8 @@ class LanguageServerTest extends TestCase $serverCapabilities->completionProvider = new CompletionOptions; $serverCapabilities->completionProvider->resolveProvider = false; $serverCapabilities->completionProvider->triggerCharacters = ['$', '>']; + $serverCapabilities->signatureHelpProvider = new SignatureHelpOptions; + $serverCapabilities->signatureHelpProvider->triggerCharacters = ['(', ',']; $serverCapabilities->xworkspaceReferencesProvider = true; $serverCapabilities->xdefinitionProvider = true; $serverCapabilities->xdependenciesProvider = true; diff --git a/tests/Server/TextDocument/SignatureHelpTest.php b/tests/Server/TextDocument/SignatureHelpTest.php new file mode 100644 index 0000000..2004aae --- /dev/null +++ b/tests/Server/TextDocument/SignatureHelpTest.php @@ -0,0 +1,199 @@ +loader = new PhpDocumentLoader($contentRetriever, $projectIndex, $definitionResolver); + $this->textDocument = new Server\TextDocument($this->loader, $definitionResolver, $client, $projectIndex); + $index->setComplete(); + } + + /** + * @dataProvider signatureHelpProvider + */ + public function testSignatureHelp(Position $position, SignatureHelp $expectedSignature) + { + $callsUri = pathToUri(__DIR__ . '/../../../fixtures/signature_help/calls.php'); + $this->loader->open($callsUri, file_get_contents($callsUri)); + $signatureHelp = $this->textDocument->signatureHelp( + new TextDocumentIdentifier($callsUri), + $position + )->wait(); + $this->assertEquals($expectedSignature, $signatureHelp); + } + + public function signatureHelpProvider(): array + { + return [ + 'member call' => [ + new Position(50, 9), + new SignatureHelp( + [ + new SignatureInformation( + '(\\Foo\\SomethingElse $a, int|null $b = null)', + [ + new ParameterInformation('\\Foo\\SomethingElse $a', 'A param with a different doc type'), + new ParameterInformation('int|null $b = null', 'Param with default value'), + ], + 'Function doc' + ) + ], + 0, + 0 + ), + ], + 'member call 2nd param active' => [ + new Position(51, 12), + new SignatureHelp( + [ + new SignatureInformation( + '(\\Foo\\SomethingElse $a, int|null $b = null)', + [ + new ParameterInformation('\\Foo\\SomethingElse $a', 'A param with a different doc type'), + new ParameterInformation('int|null $b = null', 'Param with default value'), + ], + 'Function doc' + ) + ], + 0, + 1 + ), + ], + 'member call 2nd param active and closing )' => [ + new Position(52, 11), + new SignatureHelp( + [ + new SignatureInformation( + '(\\Foo\\SomethingElse $a, int|null $b = null)', + [ + new ParameterInformation('\\Foo\\SomethingElse $a', 'A param with a different doc type'), + new ParameterInformation('int|null $b = null', 'Param with default value'), + ], + 'Function doc' + ) + ], + 0, + 1 + ), + ], + 'method with no params' => [ + new Position(53, 9), + new SignatureHelp([new SignatureInformation('()', [], 'Method with no params', 0, 0)]), + ], + 'constructor' => [ + new Position(48, 14), + new SignatureHelp( + [ + new SignatureInformation( + '(string $first, int $second, \Foo\Test $third)', + [ + new ParameterInformation('string $first', 'First param'), + new ParameterInformation('int $second', 'Second param'), + new ParameterInformation('\Foo\Test $third', 'Third param with a longer description'), + ], + 'Constructor comment goes here' + ) + ], + 0, + 0 + ), + ], + 'constructor argument expression list' => [ + new Position(49, 16), + new SignatureHelp( + [ + new SignatureInformation( + '(string $first, int $second, \Foo\Test $third)', + [ + new ParameterInformation('string $first', 'First param'), + new ParameterInformation('int $second', 'Second param'), + new ParameterInformation('\Foo\Test $third', 'Third param with a longer description'), + ], + 'Constructor comment goes here' + ) + ], + 0, + 1 + ), + ], + 'global function' => [ + new Position(57, 15), + new SignatureHelp( + [ + new SignatureInformation( + '(int $i, bool $b = false, \Foo\Test|null ...$things = null)', + [ + new ParameterInformation('int $i', 'Global function param one'), + new ParameterInformation('bool $b = false', 'Default false param'), + new ParameterInformation('\Foo\Test|null ...$things = null', 'Test things'), + ] + ), + ], + 0, + 2 + ) + ], + 'static method' => [ + new Position(60, 10), + new SignatureHelp( + [new SignatureInformation('(mixed $a)', [new ParameterInformation('mixed $a')])], + 0, + 0 + ), + ], + 'no signature help' => [ + new Position(0, 0), + new SignatureHelp([]), + ], + 'construct from non fqn (not supported)' => [ + new Position(62, 9), + new SignatureHelp([]), + ], + 'construct from non fqn (not supported) argument expression' => [ + new Position(63, 11), + new SignatureHelp([]), + ], + 'invalid var' => [ + new Position(65, 13), + new SignatureHelp([]), + ], + ]; + } +} diff --git a/tests/Validation/cases/WithReturnTypehints.php.expected.json b/tests/Validation/cases/WithReturnTypehints.php.expected.json index 8c6b092..a037d6c 100644 --- a/tests/Validation/cases/WithReturnTypehints.php.expected.json +++ b/tests/Validation/cases/WithReturnTypehints.php.expected.json @@ -31,7 +31,8 @@ }, "type": null, "declarationLine": "namespace Fixtures\\Prophecy;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "Fixtures\\Prophecy\\WithReturnTypehints": { "fqn": "Fixtures\\Prophecy\\WithReturnTypehints", @@ -52,7 +53,8 @@ }, "type": null, "declarationLine": "class WithReturnTypehints extends EmptyClass", - "documentation": null + "documentation": null, + "signatureInformation": null }, "Fixtures\\Prophecy\\WithReturnTypehints->getSelf()": { "fqn": "Fixtures\\Prophecy\\WithReturnTypehints->getSelf()", @@ -72,7 +74,12 @@ "type__tostring": "\\self", "type": {}, "declarationLine": "public function getSelf(): self {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "Fixtures\\Prophecy\\WithReturnTypehints->getName()": { "fqn": "Fixtures\\Prophecy\\WithReturnTypehints->getName()", @@ -92,7 +99,12 @@ "type__tostring": "string", "type": {}, "declarationLine": "public function getName(): string {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "Fixtures\\Prophecy\\WithReturnTypehints->getParent()": { "fqn": "Fixtures\\Prophecy\\WithReturnTypehints->getParent()", @@ -112,7 +124,12 @@ "type__tostring": "\\parent", "type": {}, "declarationLine": "public function getParent(): parent {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/anonymousClassMembersShouldNotBeSymbols.php.expected.json b/tests/Validation/cases/anonymousClassMembersShouldNotBeSymbols.php.expected.json index 51343f1..f5fbba9 100644 --- a/tests/Validation/cases/anonymousClassMembersShouldNotBeSymbols.php.expected.json +++ b/tests/Validation/cases/anonymousClassMembersShouldNotBeSymbols.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json b/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json index 107877e..1f40635 100644 --- a/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json +++ b/tests/Validation/cases/arrayValueShouldBeBoolean.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "A->foo": { "fqn": "A->foo", @@ -38,7 +39,8 @@ "type__tostring": "string[]", "type": {}, "declarationLine": "protected $foo;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/caseStatement1.php.expected.json b/tests/Validation/cases/caseStatement1.php.expected.json index 9746749..4b2f07b 100644 --- a/tests/Validation/cases/caseStatement1.php.expected.json +++ b/tests/Validation/cases/caseStatement1.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/classDefinition1.php.expected.json b/tests/Validation/cases/classDefinition1.php.expected.json index 670b5de..211a12f 100644 --- a/tests/Validation/cases/classDefinition1.php.expected.json +++ b/tests/Validation/cases/classDefinition1.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace TestNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestNamespace\\A": { "fqn": "TestNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestNamespace\\A->a": { "fqn": "TestNamespace\\A->a", @@ -64,7 +66,8 @@ "type__tostring": "int", "type": {}, "declarationLine": "public $a;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/classProperty1.php.expected.json b/tests/Validation/cases/classProperty1.php.expected.json index 921bf0b..f5ae22a 100644 --- a/tests/Validation/cases/classProperty1.php.expected.json +++ b/tests/Validation/cases/classProperty1.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace TestNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestNamespace\\TestClass": { "fqn": "TestNamespace\\TestClass", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class TestClass", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestNamespace\\TestClass->testProperty": { "fqn": "TestNamespace\\TestClass->testProperty", @@ -64,7 +66,8 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public $testProperty;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestNamespace\\TestClass->testMethod()": { "fqn": "TestNamespace\\TestClass->testMethod()", @@ -84,7 +87,17 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function testMethod($testParameter)", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "(mixed $testParameter)", + "documentation": null, + "parameters": [ + { + "label": "mixed $testParameter", + "documentation": null + } + ] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/constants.php.expected.json b/tests/Validation/cases/constants.php.expected.json index a76c059..3fcc367 100644 --- a/tests/Validation/cases/constants.php.expected.json +++ b/tests/Validation/cases/constants.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::suite()": { "fqn": "MyNamespace\\A::suite()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public static function suite()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/constants2.php.expected.json b/tests/Validation/cases/constants2.php.expected.json index ae5a2ce..0837b67 100644 --- a/tests/Validation/cases/constants2.php.expected.json +++ b/tests/Validation/cases/constants2.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::suite()": { "fqn": "MyNamespace\\A::suite()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public static function suite()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/constants3.php.expected.json b/tests/Validation/cases/constants3.php.expected.json index c6ad922..4b780a0 100644 --- a/tests/Validation/cases/constants3.php.expected.json +++ b/tests/Validation/cases/constants3.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::suite()": { "fqn": "MyNamespace\\A::suite()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public static function suite()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/constants4.php.expected.json b/tests/Validation/cases/constants4.php.expected.json index bc46cf1..1f2bcd5 100644 --- a/tests/Validation/cases/constants4.php.expected.json +++ b/tests/Validation/cases/constants4.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->suite()": { "fqn": "MyNamespace\\A->suite()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function suite()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/constants5.php.expected.json b/tests/Validation/cases/constants5.php.expected.json index 6bd7b8e..6b93043 100644 --- a/tests/Validation/cases/constants5.php.expected.json +++ b/tests/Validation/cases/constants5.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\Mbstring": { "fqn": "MyNamespace\\Mbstring", @@ -41,7 +42,8 @@ }, "type": null, "declarationLine": "class Mbstring", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\Mbstring::MB_CASE_FOLD": { "fqn": "MyNamespace\\Mbstring::MB_CASE_FOLD", @@ -61,7 +63,8 @@ "type__tostring": "\\MyNamespace\\PHP_INT_MAX", "type": {}, "declarationLine": "const MB_CASE_FOLD = PHP_INT_MAX;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json b/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json index b49f5a9..0a34c36 100644 --- a/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json +++ b/tests/Validation/cases/constantsInFunctionParamDefault.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "interface A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "A->b()": { "fqn": "A->b()", @@ -42,7 +43,17 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b ($a = MY_CONSTANT);", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "(\\MY_CONSTANT $a = MY_CONSTANT)", + "documentation": null, + "parameters": [ + { + "label": "\\MY_CONSTANT $a = MY_CONSTANT", + "documentation": null + } + ] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/docBlocksOnNamespaceDefinition.php.expected.json b/tests/Validation/cases/docBlocksOnNamespaceDefinition.php.expected.json index dd1737a..27f5df9 100644 --- a/tests/Validation/cases/docBlocksOnNamespaceDefinition.php.expected.json +++ b/tests/Validation/cases/docBlocksOnNamespaceDefinition.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/exceptions1.php.expected.json b/tests/Validation/cases/exceptions1.php.expected.json index c1ee1bd..2dc57b3 100644 --- a/tests/Validation/cases/exceptions1.php.expected.json +++ b/tests/Validation/cases/exceptions1.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/ifStatement1.php.expected.json b/tests/Validation/cases/ifStatement1.php.expected.json index 98e6572..e422270 100644 --- a/tests/Validation/cases/ifStatement1.php.expected.json +++ b/tests/Validation/cases/ifStatement1.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/interfaceProperty.php.expected.json b/tests/Validation/cases/interfaceProperty.php.expected.json index 10c49f0..d22d028 100644 --- a/tests/Validation/cases/interfaceProperty.php.expected.json +++ b/tests/Validation/cases/interfaceProperty.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "interface A {", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/magicConstantsShouldBeGlobal.php.expected.json b/tests/Validation/cases/magicConstantsShouldBeGlobal.php.expected.json index a9c2162..5b04b54 100644 --- a/tests/Validation/cases/magicConstantsShouldBeGlobal.php.expected.json +++ b/tests/Validation/cases/magicConstantsShouldBeGlobal.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace B;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/magicConsts.php.expected.json b/tests/Validation/cases/magicConsts.php.expected.json index 6f863b9..545f1cb 100644 --- a/tests/Validation/cases/magicConsts.php.expected.json +++ b/tests/Validation/cases/magicConsts.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "A::$deprecationsTriggered": { "fqn": "A::$deprecationsTriggered", @@ -42,7 +43,8 @@ "type__tostring": "\\__CLASS__[]", "type": {}, "declarationLine": "private static $deprecationsTriggered;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/memberAccess1.php.expected.json b/tests/Validation/cases/memberAccess1.php.expected.json index c039e5e..f0286c3 100644 --- a/tests/Validation/cases/memberAccess1.php.expected.json +++ b/tests/Validation/cases/memberAccess1.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::a()": { "fqn": "MyNamespace\\A::a()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "static function a() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/memberAccess2.php.expected.json b/tests/Validation/cases/memberAccess2.php.expected.json index 50902a1..6060e8e 100644 --- a/tests/Validation/cases/memberAccess2.php.expected.json +++ b/tests/Validation/cases/memberAccess2.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::a()": { "fqn": "MyNamespace\\A::a()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "static function a() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/memberAccess3.php.expected.json b/tests/Validation/cases/memberAccess3.php.expected.json index d91b27d..b0af5aa 100644 --- a/tests/Validation/cases/memberAccess3.php.expected.json +++ b/tests/Validation/cases/memberAccess3.php.expected.json @@ -40,7 +40,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -59,7 +60,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::getInitializer()": { "fqn": "MyNamespace\\A::getInitializer()", @@ -79,7 +81,17 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public static function getInitializer(ClassLoader $loader)", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "(\\MyNamespace\\ClassLoader $loader)", + "documentation": null, + "parameters": [ + { + "label": "\\MyNamespace\\ClassLoader $loader", + "documentation": null + } + ] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/memberAccess4.php.expected.json b/tests/Validation/cases/memberAccess4.php.expected.json index 0b7e1bf..951cacd 100644 --- a/tests/Validation/cases/memberAccess4.php.expected.json +++ b/tests/Validation/cases/memberAccess4.php.expected.json @@ -31,7 +31,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -50,7 +51,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->testRequest()": { "fqn": "MyNamespace\\A->testRequest()", @@ -70,7 +72,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function testRequest()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/memberAccess5.php.expected.json b/tests/Validation/cases/memberAccess5.php.expected.json index 050cf3b..d4e9104 100644 --- a/tests/Validation/cases/memberAccess5.php.expected.json +++ b/tests/Validation/cases/memberAccess5.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\ParseErrorsTest": { "fqn": "MyNamespace\\ParseErrorsTest", @@ -41,7 +42,8 @@ }, "type": null, "declarationLine": "class ParseErrorsTest {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\ParseErrorsTest->setUp()": { "fqn": "MyNamespace\\ParseErrorsTest->setUp()", @@ -61,7 +63,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function setUp()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/memberCall1.php.expected.json b/tests/Validation/cases/memberCall1.php.expected.json index d02d7e3..50e91d1 100644 --- a/tests/Validation/cases/memberCall1.php.expected.json +++ b/tests/Validation/cases/memberCall1.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\ParseErrorsTest": { "fqn": "MyNamespace\\ParseErrorsTest", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class ParseErrorsTest", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\ParseErrorsTest->setAccount()": { "fqn": "MyNamespace\\ParseErrorsTest->setAccount()", @@ -67,7 +69,17 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function setAccount(AccountInterface $account)", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "(\\MyNamespace\\AccountInterface $account)", + "documentation": null, + "parameters": [ + { + "label": "\\MyNamespace\\AccountInterface $account", + "documentation": null + } + ] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/methodReturnType.php.expected.json b/tests/Validation/cases/methodReturnType.php.expected.json index 2c89994..0d537c5 100644 --- a/tests/Validation/cases/methodReturnType.php.expected.json +++ b/tests/Validation/cases/methodReturnType.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "class FooClass {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "FooClass->foo()": { "fqn": "FooClass->foo()", @@ -42,7 +43,12 @@ "type__tostring": "\\FooClass", "type": {}, "declarationLine": "public function foo(): FooClass {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/multipleNamespaces.php.expected.json b/tests/Validation/cases/multipleNamespaces.php.expected.json index fa51f2d..c308cf9 100644 --- a/tests/Validation/cases/multipleNamespaces.php.expected.json +++ b/tests/Validation/cases/multipleNamespaces.php.expected.json @@ -31,7 +31,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace1;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace1\\B": { "fqn": "MyNamespace1\\B", @@ -50,7 +51,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace1\\B->b()": { "fqn": "MyNamespace1\\B->b()", @@ -70,7 +72,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace2": { "fqn": "MyNamespace2", @@ -89,7 +96,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace2;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace2\\A": { "fqn": "MyNamespace2\\A", @@ -110,7 +118,8 @@ }, "type": null, "declarationLine": "class A extends MyNamespace1\\B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace2\\A->a()": { "fqn": "MyNamespace2\\A->a()", @@ -130,7 +139,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/multiplePreceedingComments.php.expected.json b/tests/Validation/cases/multiplePreceedingComments.php.expected.json index 96cbb4a..2bca2b6 100644 --- a/tests/Validation/cases/multiplePreceedingComments.php.expected.json +++ b/tests/Validation/cases/multiplePreceedingComments.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "class Foo", - "documentation": null + "documentation": null, + "signatureInformation": null }, "Foo->fn()": { "fqn": "Foo->fn()", @@ -38,7 +39,12 @@ "type__tostring": "\\Iterator", "type": {}, "declarationLine": "public function fn()", - "documentation": "Foo" + "documentation": "Foo", + "signatureInformation": { + "label": "()", + "documentation": "Foo", + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/nameToken.php.expected.json b/tests/Validation/cases/nameToken.php.expected.json index 37cb4ca..c52d483 100644 --- a/tests/Validation/cases/nameToken.php.expected.json +++ b/tests/Validation/cases/nameToken.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "A->b()": { "fqn": "A->b()", @@ -42,7 +43,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/namespaces2.php.expected.json b/tests/Validation/cases/namespaces2.php.expected.json index 0dffc9f..cd0ade5 100644 --- a/tests/Validation/cases/namespaces2.php.expected.json +++ b/tests/Validation/cases/namespaces2.php.expected.json @@ -31,7 +31,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace1;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/namespaces5.php.expected.json b/tests/Validation/cases/namespaces5.php.expected.json index e609ca2..7ad96f3 100644 --- a/tests/Validation/cases/namespaces5.php.expected.json +++ b/tests/Validation/cases/namespaces5.php.expected.json @@ -40,7 +40,8 @@ }, "type": null, "declarationLine": "namespace B;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/namespaces6.php.expected.json b/tests/Validation/cases/namespaces6.php.expected.json index bf5a045..6c559a3 100644 --- a/tests/Validation/cases/namespaces6.php.expected.json +++ b/tests/Validation/cases/namespaces6.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "namespace A \\ B;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/namespaces8.php.expected.json b/tests/Validation/cases/namespaces8.php.expected.json index d303647..95c5019 100644 --- a/tests/Validation/cases/namespaces8.php.expected.json +++ b/tests/Validation/cases/namespaces8.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace LanguageServer\\Tests\\Utils;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/objectCreation.php.expected.json b/tests/Validation/cases/objectCreation.php.expected.json index 8fec38f..90ad0f5 100644 --- a/tests/Validation/cases/objectCreation.php.expected.json +++ b/tests/Validation/cases/objectCreation.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -41,7 +42,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -61,7 +63,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/objectCreation2.php.expected.json b/tests/Validation/cases/objectCreation2.php.expected.json index e546528..b6f69a3 100644 --- a/tests/Validation/cases/objectCreation2.php.expected.json +++ b/tests/Validation/cases/objectCreation2.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -63,7 +65,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -83,7 +86,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/objectCreation3.php.expected.json b/tests/Validation/cases/objectCreation3.php.expected.json index d2d3e2f..a5f389b 100644 --- a/tests/Validation/cases/objectCreation3.php.expected.json +++ b/tests/Validation/cases/objectCreation3.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "A->a()": { "fqn": "A->a()", @@ -42,7 +43,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/param1.php.expected.json b/tests/Validation/cases/param1.php.expected.json index 40cfbd1..dd7c2a6 100644 --- a/tests/Validation/cases/param1.php.expected.json +++ b/tests/Validation/cases/param1.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\init()": { "fqn": "MyNamespace\\init()", @@ -42,7 +43,17 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function init(Hi $view)", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "(\\MyNamespace\\Hi $view)", + "documentation": null, + "parameters": [ + { + "label": "\\MyNamespace\\Hi $view", + "documentation": null + } + ] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/parent1.php.expected.json b/tests/Validation/cases/parent1.php.expected.json index 56d7e61..661f631 100644 --- a/tests/Validation/cases/parent1.php.expected.json +++ b/tests/Validation/cases/parent1.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -41,7 +42,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -61,7 +63,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -82,7 +89,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -102,7 +110,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/parent3.php.expected.json b/tests/Validation/cases/parent3.php.expected.json index 3954754..9ad39f8 100644 --- a/tests/Validation/cases/parent3.php.expected.json +++ b/tests/Validation/cases/parent3.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -85,7 +92,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -105,7 +113,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/propertyName1.php.expected.json b/tests/Validation/cases/propertyName1.php.expected.json index cc31ed6..d43cabf 100644 --- a/tests/Validation/cases/propertyName1.php.expected.json +++ b/tests/Validation/cases/propertyName1.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "class MyClass", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyClass->mainPropertyName": { "fqn": "MyClass->mainPropertyName", @@ -38,7 +39,8 @@ "type__tostring": "string", "type": {}, "declarationLine": "protected $mainPropertyName;", - "documentation": "The name of the main property, or NULL if there is none." + "documentation": "The name of the main property, or NULL if there is none.", + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/propertyName2.php.expected.json b/tests/Validation/cases/propertyName2.php.expected.json index d4efb42..4b5bd9b 100644 --- a/tests/Validation/cases/propertyName2.php.expected.json +++ b/tests/Validation/cases/propertyName2.php.expected.json @@ -18,7 +18,8 @@ }, "type": null, "declarationLine": "class MyClass", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyClass->mainPropertyName": { "fqn": "MyClass->mainPropertyName", @@ -38,7 +39,8 @@ "type__tostring": "string", "type": {}, "declarationLine": "protected $mainPropertyName;", - "documentation": "The name of the main property, or NULL if there is none." + "documentation": "The name of the main property, or NULL if there is none.", + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/returnType.php.expected.json b/tests/Validation/cases/returnType.php.expected.json index 20cdadf..17a4802 100644 --- a/tests/Validation/cases/returnType.php.expected.json +++ b/tests/Validation/cases/returnType.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace TestNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestNamespace\\whatever()": { "fqn": "TestNamespace\\whatever()", @@ -45,7 +46,17 @@ "type__tostring": "\\TestNamespace\\TestClass", "type": {}, "declarationLine": "function whatever(TestClass $param): TestClass2 {", - "documentation": "Aute duis elit reprehenderit tempor cillum proident anim laborum eu laboris reprehenderit ea incididunt." + "documentation": "Aute duis elit reprehenderit tempor cillum proident anim laborum eu laboris reprehenderit ea incididunt.", + "signatureInformation": { + "label": "(\\TestNamespace\\TestClass $param)", + "documentation": "Aute duis elit reprehenderit tempor cillum proident anim laborum eu laboris reprehenderit ea incididunt.", + "parameters": [ + { + "label": "\\TestNamespace\\TestClass $param", + "documentation": "Adipisicing non non cillum sint incididunt cillum enim mollit." + } + ] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/scopedPropertyAccess.php.expected.json b/tests/Validation/cases/scopedPropertyAccess.php.expected.json index ec50c7a..6020ee8 100644 --- a/tests/Validation/cases/scopedPropertyAccess.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -44,7 +45,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::a()": { "fqn": "MyNamespace\\A::a()", @@ -64,7 +66,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "static function a() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/scopedPropertyAccess2.php.expected.json b/tests/Validation/cases/scopedPropertyAccess2.php.expected.json index e1712cd..664d790 100644 --- a/tests/Validation/cases/scopedPropertyAccess2.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess2.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/scopedPropertyAccess3.php.expected.json b/tests/Validation/cases/scopedPropertyAccess3.php.expected.json index 913721b..54ca5f1 100644 --- a/tests/Validation/cases/scopedPropertyAccess3.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess3.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "class A {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "A::$a": { "fqn": "A::$a", @@ -45,7 +46,8 @@ "type__tostring": "string", "type": {}, "declarationLine": "static $a;", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/scopedPropertyAccess5.php.expected.json b/tests/Validation/cases/scopedPropertyAccess5.php.expected.json index 7e56123..ee944ed 100644 --- a/tests/Validation/cases/scopedPropertyAccess5.php.expected.json +++ b/tests/Validation/cases/scopedPropertyAccess5.php.expected.json @@ -31,7 +31,8 @@ }, "type": null, "declarationLine": "class TestClass implements TestInterface {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "TestClass::$testProperty": { "fqn": "TestClass::$testProperty", @@ -51,7 +52,8 @@ "type__tostring": "\\TestClass[]", "type": {}, "declarationLine": "public static $testProperty;", - "documentation": "Lorem excepteur officia sit anim velit veniam enim." + "documentation": "Lorem excepteur officia sit anim velit veniam enim.", + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/self1.php.expected.json b/tests/Validation/cases/self1.php.expected.json index fe2bc63..899df1c 100644 --- a/tests/Validation/cases/self1.php.expected.json +++ b/tests/Validation/cases/self1.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -67,7 +69,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -88,7 +95,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -108,7 +116,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/self2.php.expected.json b/tests/Validation/cases/self2.php.expected.json index 60ab062..1c1ef87 100644 --- a/tests/Validation/cases/self2.php.expected.json +++ b/tests/Validation/cases/self2.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -67,7 +69,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -88,7 +95,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -108,7 +116,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/self3.php.expected.json b/tests/Validation/cases/self3.php.expected.json index 7d66c2b..0a43146 100644 --- a/tests/Validation/cases/self3.php.expected.json +++ b/tests/Validation/cases/self3.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -67,7 +69,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -88,7 +95,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -108,7 +116,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/self4.php.expected.json b/tests/Validation/cases/self4.php.expected.json index 64765b7..b925fdd 100644 --- a/tests/Validation/cases/self4.php.expected.json +++ b/tests/Validation/cases/self4.php.expected.json @@ -37,7 +37,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -56,7 +57,8 @@ }, "type": null, "declarationLine": "class A", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A::suite()": { "fqn": "MyNamespace\\A::suite()", @@ -76,7 +78,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public static function suite()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/self5.php.expected.json b/tests/Validation/cases/self5.php.expected.json index eb41832..10ba7fb 100644 --- a/tests/Validation/cases/self5.php.expected.json +++ b/tests/Validation/cases/self5.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -41,7 +42,8 @@ }, "type": null, "declarationLine": "class A", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->typesProvider()": { "fqn": "MyNamespace\\A->typesProvider()", @@ -61,7 +63,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function typesProvider()", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/static1.php.expected.json b/tests/Validation/cases/static1.php.expected.json index db1a0d2..c71c7c2 100644 --- a/tests/Validation/cases/static1.php.expected.json +++ b/tests/Validation/cases/static1.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -67,7 +69,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -88,7 +95,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -108,7 +116,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/static2.php.expected.json b/tests/Validation/cases/static2.php.expected.json index bb662cb..5b5a706 100644 --- a/tests/Validation/cases/static2.php.expected.json +++ b/tests/Validation/cases/static2.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -67,7 +69,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -88,7 +95,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -108,7 +116,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/static3.php.expected.json b/tests/Validation/cases/static3.php.expected.json index 34d3851..a88f554 100644 --- a/tests/Validation/cases/static3.php.expected.json +++ b/tests/Validation/cases/static3.php.expected.json @@ -28,7 +28,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B": { "fqn": "MyNamespace\\B", @@ -47,7 +48,8 @@ }, "type": null, "declarationLine": "class B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\B->b()": { "fqn": "MyNamespace\\B->b()", @@ -67,7 +69,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function b() {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -88,7 +95,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -108,7 +116,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/static4.php.expected.json b/tests/Validation/cases/static4.php.expected.json index de71d41..adc75a9 100644 --- a/tests/Validation/cases/static4.php.expected.json +++ b/tests/Validation/cases/static4.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "namespace MyNamespace;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A": { "fqn": "MyNamespace\\A", @@ -46,7 +47,8 @@ }, "type": null, "declarationLine": "class A extends B {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "MyNamespace\\A->a()": { "fqn": "MyNamespace\\A->a()", @@ -66,7 +68,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/staticMethodReturnType.php.expected.json b/tests/Validation/cases/staticMethodReturnType.php.expected.json index e6661ec..8de5673 100644 --- a/tests/Validation/cases/staticMethodReturnType.php.expected.json +++ b/tests/Validation/cases/staticMethodReturnType.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "class FooClass {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "FooClass::staticFoo()": { "fqn": "FooClass::staticFoo()", @@ -42,7 +43,12 @@ "type__tostring": "\\FooClass", "type": {}, "declarationLine": "public static function staticFoo(): FooClass {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } }, "FooClass->bar()": { "fqn": "FooClass->bar()", @@ -62,7 +68,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function bar() { }", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/stringVariable.php.expected.json b/tests/Validation/cases/stringVariable.php.expected.json index 1d4c7e3..6372c89 100644 --- a/tests/Validation/cases/stringVariable.php.expected.json +++ b/tests/Validation/cases/stringVariable.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "class B", - "documentation": null + "documentation": null, + "signatureInformation": null }, "B->hi": { "fqn": "B->hi", @@ -42,7 +43,8 @@ "type__tostring": "int", "type": {}, "declarationLine": "public $hi;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "B->a()": { "fqn": "B->a()", @@ -62,7 +64,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "function a () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file diff --git a/tests/Validation/cases/testQualifiedNameOutsideOfNamespace.php.expected.json b/tests/Validation/cases/testQualifiedNameOutsideOfNamespace.php.expected.json index 509907c..7966afb 100644 --- a/tests/Validation/cases/testQualifiedNameOutsideOfNamespace.php.expected.json +++ b/tests/Validation/cases/testQualifiedNameOutsideOfNamespace.php.expected.json @@ -22,7 +22,8 @@ }, "type": null, "declarationLine": "namespace SomeNamespace { }", - "documentation": null + "documentation": null, + "signatureInformation": null } } } \ No newline at end of file diff --git a/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json b/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json index 662a7ed..a434cf2 100644 --- a/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json +++ b/tests/Validation/cases/verifyFqsenOnClassProperty.php.expected.json @@ -25,7 +25,8 @@ }, "type": null, "declarationLine": "class Foo {", - "documentation": null + "documentation": null, + "signatureInformation": null }, "Foo->bar": { "fqn": "Foo->bar", @@ -45,7 +46,8 @@ "type__tostring": "\\", "type": {}, "declarationLine": "protected $bar;", - "documentation": null + "documentation": null, + "signatureInformation": null }, "Foo->foo()": { "fqn": "Foo->foo()", @@ -65,7 +67,12 @@ "type__tostring": "mixed", "type": {}, "declarationLine": "public function foo () {", - "documentation": null + "documentation": null, + "signatureInformation": { + "label": "()", + "documentation": null, + "parameters": [] + } } } } \ No newline at end of file