From e3d9f1604ca1fd9f99c544a1295d3b124e127b3e Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Tue, 13 Dec 2016 00:49:26 +0100 Subject: [PATCH] Return empty result for definition inside stubs --- src/Server/TextDocument.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Server/TextDocument.php b/src/Server/TextDocument.php index 32ec8e4..e4adc22 100644 --- a/src/Server/TextDocument.php +++ b/src/Server/TextDocument.php @@ -244,7 +244,11 @@ class TextDocument return []; } $def = $this->definitionResolver->resolveReferenceNodeToDefinition($node); - if ($def === null || $def->symbolInformation === null) { + if ( + $def === null + || $def->symbolInformation === null + || Uri\parse($def->symbolInformation->location->uri)['scheme'] === 'phpstubs' + ) { return []; } return $def->symbolInformation->location;