1
0
Fork 0

Merge branch 'master' into autocomplet-speedup

pull/599/head
Declspeck 2018-03-01 15:08:39 +02:00
commit 334683ae75
No known key found for this signature in database
GPG Key ID: F0417663122A2189
17 changed files with 10 additions and 32 deletions

View File

@ -1,9 +1,8 @@
language: php
php:
- '7.0'
- '7.2.0RC5'
- '7.2'
git:
depth: 10

View File

@ -51,11 +51,7 @@ foreach($frameworks as $framework) {
$definitionResolver = new DefinitionResolver($index);
$parser = new PhpParser\Parser();
try {
$document = new PhpDocument($testCaseFile, $fileContents, $index, $parser, $docBlockFactory, $definitionResolver);
} catch (\Throwable $e) {
continue;
}
$document = new PhpDocument($testCaseFile, $fileContents, $index, $parser, $docBlockFactory, $definitionResolver);
}
echo "------------------------------\n";

View File

@ -10,9 +10,6 @@ collectors:
commit_message_prefix: "chore: "
- type: js-npm
path: /
settings:
dist_tags:
semantic-release: next
actors:
- type: js-npm
versions: "Y.0.0"

View File

@ -3,7 +3,6 @@ declare(strict_types = 1);
namespace LanguageServer\Cache;
use LanguageServer\LanguageClient;
use Sabre\Event\Promise;
/**

View File

@ -4,7 +4,7 @@ declare(strict_types = 1);
namespace LanguageServer\Client;
use LanguageServer\ClientHandler;
use LanguageServer\Protocol\{Message, TextDocumentItem, TextDocumentIdentifier};
use LanguageServer\Protocol\{TextDocumentItem, TextDocumentIdentifier};
use Sabre\Event\Promise;
use JsonMapper;

View File

@ -4,7 +4,6 @@ declare(strict_types = 1);
namespace LanguageServer\Client;
use LanguageServer\ClientHandler;
use LanguageServer\Protocol\Message;
use Sabre\Event\Promise;
/**

View File

@ -4,7 +4,6 @@ declare(strict_types = 1);
namespace LanguageServer\Client;
use LanguageServer\ClientHandler;
use LanguageServer\Protocol\Message;
use Sabre\Event\Promise;
/**

View File

@ -6,7 +6,6 @@ namespace LanguageServer;
use LanguageServer\Index\ReadableIndex;
use phpDocumentor\Reflection\{Types, Type, Fqsen, TypeResolver};
use LanguageServer\Protocol\SymbolInformation;
use Exception;
use Generator;
/**
@ -69,7 +68,7 @@ class Definition
public $canBeInstantiated;
/**
* @var Protocol\SymbolInformation
* @var SymbolInformation
*/
public $symbolInformation;

View File

@ -3,7 +3,6 @@
namespace LanguageServer\FqnUtilities;
use phpDocumentor\Reflection\{Type, Types};
use Microsoft\PhpParser;
/**
* Returns all possible FQNs in a type

View File

@ -6,10 +6,8 @@ namespace LanguageServer;
use LanguageServer\Cache\Cache;
use LanguageServer\FilesFinder\FilesFinder;
use LanguageServer\Index\{DependenciesIndex, Index};
use LanguageServer\Protocol\Message;
use LanguageServer\Protocol\MessageType;
use Webmozart\PathUtil\Path;
use Composer\Semver\VersionParser;
use Sabre\Event\Promise;
use function Sabre\Event\coroutine;

View File

@ -160,7 +160,9 @@ class PhpDocument
// Register this document on the project for references
foreach ($this->referenceNodes as $fqn => $nodes) {
$this->index->addReferenceUri($fqn, $this->uri);
// Cast the key to string. If (string)'2' is set as an array index, it will read out as (int)2. We must
// deal with incorrect code, so this is a valid scenario.
$this->index->addReferenceUri((string)$fqn, $this->uri);
}
$this->sourceFileNode = $treeAnalyzer->getSourceFileNode();

View File

@ -4,7 +4,6 @@ namespace LanguageServer\Protocol;
use Microsoft\PhpParser;
use Microsoft\PhpParser\Node;
use Exception;
/**
* Represents information about programming constructs like variables, classes,

View File

@ -8,7 +8,6 @@ use Sabre\Event\{
Loop,
Promise
};
use RuntimeException;
class ProtocolStreamWriter implements ProtocolWriter
{

View File

@ -23,7 +23,6 @@ use LanguageServer\Protocol\{
VersionedTextDocumentIdentifier,
CompletionContext
};
use Microsoft\PhpParser;
use Microsoft\PhpParser\Node;
use Sabre\Event\Promise;
use Sabre\Uri;

View File

@ -3,18 +3,16 @@ declare(strict_types = 1);
namespace LanguageServer\Server;
use LanguageServer\{LanguageClient, Project, PhpDocumentLoader};
use LanguageServer\{LanguageClient, PhpDocumentLoader};
use LanguageServer\Index\{ProjectIndex, DependenciesIndex, Index};
use LanguageServer\Protocol\{
FileChangeType,
FileEvent,
SymbolInformation,
SymbolDescriptor,
PackageDescriptor,
ReferenceInformation,
DependencyReference,
Location,
MessageType
Location
};
use Sabre\Event\Promise;
use function Sabre\Event\coroutine;

View File

@ -7,10 +7,8 @@ use LanguageServer\Index\ReadableIndex;
use LanguageServer\Protocol\{
Position,
SignatureHelp,
SignatureInformation,
ParameterInformation
};
use Microsoft\PhpParser;
use Microsoft\PhpParser\Node;
use Sabre\Event\Promise;
use function Sabre\Event\coroutine;

View File

@ -3,10 +3,8 @@ declare(strict_types = 1);
namespace LanguageServer;
use LanguageServer\Protocol\{Diagnostic, DiagnosticSeverity, Range, Position, TextEdit};
use LanguageServer\Index\Index;
use LanguageServer\Protocol\{Diagnostic, DiagnosticSeverity, Range, Position};
use phpDocumentor\Reflection\DocBlockFactory;
use Sabre\Uri;
use Microsoft\PhpParser;
use Microsoft\PhpParser\Node;
use Microsoft\PhpParser\Token;