Merge branch 'master' into signature-help
commit
cc28b47abe
|
@ -7,3 +7,4 @@ fixtures/
|
|||
coverage/
|
||||
coverage.xml
|
||||
images/
|
||||
node_modules/
|
||||
|
|
|
@ -7,7 +7,7 @@ trim_trailing_whitespace = true
|
|||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.json,*.yml]
|
||||
[*.{json,yml}]
|
||||
indent_size = 2
|
||||
|
||||
[composer.json]
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
* text=auto
|
||||
|
||||
/.vscode export-ignore
|
||||
/fixtures export-ignore
|
||||
/images export-ignore
|
||||
/tests export-ignore
|
||||
/validation export-ignore
|
||||
/.dockerignore export-ignore
|
||||
/.editorconfig export-ignore
|
||||
/.gitattributes export-ignore
|
||||
/.gitignore export-ignore
|
||||
/.gitmodules export-ignore
|
||||
/.npmrc export-ignore
|
||||
/.travis.yml export-ignore
|
||||
/codecov.yml export-ignore
|
||||
/dependencies.yml export-ignore
|
||||
/Dockerfile export-ignore
|
||||
/package.json export-ignore
|
||||
/Performance.php export-ignore
|
||||
/php.ini export-ignore
|
||||
/phpcs.xml.dist export-ignore
|
||||
/phpunit.xml.dist export-ignore
|
||||
/release-docker.php export-ignore
|
|
@ -4,4 +4,5 @@ vendor/
|
|||
.phpls/
|
||||
composer.lock
|
||||
stubs
|
||||
*.ast
|
||||
*.ast
|
||||
node_modules/
|
||||
|
|
71
.travis.yml
71
.travis.yml
|
@ -1,28 +1,65 @@
|
|||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- '7.0'
|
||||
- '7.0'
|
||||
- '7.2.0RC5'
|
||||
|
||||
services:
|
||||
- docker
|
||||
git:
|
||||
depth: 10
|
||||
submodules: false
|
||||
|
||||
env:
|
||||
global:
|
||||
- BUILD_LEADER_ID=4
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.npm
|
||||
|
||||
install:
|
||||
- composer install
|
||||
- composer run-script parse-stubs
|
||||
|
||||
- composer install --prefer-dist --no-interaction
|
||||
script:
|
||||
- vendor/bin/phpcs -n
|
||||
- vendor/bin/phpunit --coverage-clover=coverage.xml
|
||||
- vendor/bin/phpcs -n
|
||||
- vendor/bin/phpunit --coverage-clover=coverage.xml
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- |
|
||||
if [[ $TRAVIS_TAG == v* ]]; then
|
||||
docker build -t felixfbecker/php-language-server:${TRAVIS_TAG:1} .
|
||||
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||
docker push felixfbecker/php-language-server:${TRAVIS_TAG:1}
|
||||
fi
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
os: osx
|
||||
osx_image: xcode9.1
|
||||
language: generic
|
||||
before_install:
|
||||
# Fix ruby error https://github.com/Homebrew/brew/issues/3299
|
||||
- brew update
|
||||
- brew tap homebrew/homebrew-php
|
||||
- brew install php71
|
||||
- brew install homebrew/php/php71-xdebug
|
||||
- curl https://getcomposer.org/installer | php
|
||||
- ln -s "`pwd`/composer.phar" /usr/local/bin/composer
|
||||
- stage: release
|
||||
php: '7.0'
|
||||
services:
|
||||
- docker
|
||||
install:
|
||||
- git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
|
||||
- git fetch --tags
|
||||
- composer install --prefer-dist --no-interaction
|
||||
- nvm install 8
|
||||
- nvm use 8
|
||||
- npm install
|
||||
script: skip
|
||||
after_success:
|
||||
- npm run semantic-release
|
||||
|
||||
stages:
|
||||
- test
|
||||
- name: release
|
||||
if: branch = master AND type = push AND fork = false
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^v\d+\.\d+\.\d+$/
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
FROM php:7-cli
|
||||
MAINTAINER Felix Becker <felix.b@outlook.com>
|
||||
|
||||
RUN apt-get update \
|
||||
# Needed for CodeSniffer
|
||||
&& apt-get install -y libxml2 libxml2-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN docker-php-ext-configure pcntl --enable-pcntl
|
||||
RUN docker-php-ext-install pcntl
|
||||
COPY ./php.ini /usr/local/etc/php/conf.d/
|
||||
|
|
24
README.md
24
README.md
|
@ -1,9 +1,11 @@
|
|||
# PHP Language Server
|
||||
|
||||
[](https://packagist.org/packages/felixfbecker/language-server)
|
||||
[](https://travis-ci.org/felixfbecker/php-language-server)
|
||||
[](https://travis-ci.org/felixfbecker/php-language-server)
|
||||
[](https://ci.appveyor.com/project/felixfbecker/php-language-server/branch/master)
|
||||
[](https://codecov.io/gh/felixfbecker/php-language-server)
|
||||
[](https://gemnasium.com/github.com/felixfbecker/php-language-server)
|
||||
[](https://github.com/semantic-release/semantic-release)
|
||||
[](https://php.net/)
|
||||
[](https://github.com/felixfbecker/php-language-server/blob/master/LICENSE.txt)
|
||||
[](https://gitter.im/felixfbecker/php-language-server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
@ -40,9 +42,6 @@ For Parameters, it will return the `@param` tag.
|
|||
The query is matched case-insensitively against the fully qualified name of the symbol.
|
||||
Non-Standard: An empty query will return _all_ symbols found in the workspace.
|
||||
|
||||
### [Document Formatting](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#document-formatting-request)
|
||||

|
||||
|
||||
### Error reporting through [Publish Diagnostics](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#publishdiagnostics-notification)
|
||||

|
||||
|
||||
|
@ -190,14 +189,21 @@ Clone the repository and run
|
|||
composer install
|
||||
|
||||
to install dependencies.
|
||||
Then parse the stubs with
|
||||
|
||||
composer run-script parse-stubs
|
||||
|
||||
Run the tests with
|
||||
|
||||
vendor/bin/phpunit
|
||||
composer test
|
||||
|
||||
Lint with
|
||||
|
||||
vendor/bin/phpcs
|
||||
composer lint
|
||||
|
||||
The project parses PHPStorm's PHP stubs to get support for PHP builtins. It re-parses them as needed after Composer processes, but after some code changes (such as ones involving the index or parsing) you may have to explicitly re-parse them:
|
||||
|
||||
composer run-script parse-stubs
|
||||
|
||||
To debug with xDebug ensure that you have this set as an environment variable
|
||||
|
||||
COMPOSER_ALLOW_XDEBUG=1
|
||||
|
||||
This tells the Language Server to not restart without XDebug if it detects that XDebug is enabled (XDebug has a high performance impact).
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
version: '{build}'
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
skip_tags: true
|
||||
skip_branch_with_pr: true
|
||||
clone_depth: 1
|
||||
max_jobs: 3
|
||||
|
||||
cache:
|
||||
- '%LOCALAPPDATA%\Composer'
|
||||
- '%LOCALAPPDATA%\Temp\Chocolatey'
|
||||
|
||||
environment:
|
||||
ANSICON: 121x90 (121x90)
|
||||
matrix:
|
||||
- { PHP_VERSION: '7.1.11', VC_VERSION: '14', XDEBUG_VERSION: '2.5.5' }
|
||||
|
||||
install:
|
||||
# Enable Windows Update service, needed to install vcredist2015 (dependency of php)
|
||||
- ps: Set-Service wuauserv -StartupType Manual
|
||||
- choco config set cacheLocation %LOCALAPPDATA%\Temp\Chocolatey
|
||||
- choco install -y php --version %PHP_VERSION%
|
||||
- choco install -y composer
|
||||
- refreshenv
|
||||
- composer install --no-interaction --no-progress --prefer-dist
|
||||
# Install XDebug for code coverage
|
||||
- ps: |
|
||||
$client = New-Object System.Net.WebClient
|
||||
$phpMinorVersion = $env:PHP_VERSION -replace '\.\d+$'
|
||||
$xdebugUrl = "https://xdebug.org/files/php_xdebug-$env:XDEBUG_VERSION-$phpMinorVersion-vc14-nts-x86_64.dll"
|
||||
$phpDir = (Get-Item (Get-Command php).Source).Directory.FullName
|
||||
$xdebugPath = Join-Path $phpDir ext\xdebug.dll
|
||||
$client.DownloadFile($xdebugUrl, $xdebugPath)
|
||||
$phpIniPath = Join-Path $phpDir php.ini
|
||||
Add-Content $phpIniPath @"
|
||||
zend_extension=$xdebugPath
|
||||
"@
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- vendor\bin\phpunit --coverage-clover=coverage/coverage.xml
|
||||
|
||||
after_test:
|
||||
- ps: |
|
||||
# Delete vendor because it causes problems with codecovs report search
|
||||
# https://github.com/codecov/codecov-bash/issues/96
|
||||
Remove-Item -Recurse -Force vendor
|
||||
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
|
||||
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
|
||||
bash codecov.sh -f 'coverage/coverage.xml'
|
|
@ -1,14 +1,7 @@
|
|||
{
|
||||
"name": "felixfbecker/language-server",
|
||||
"description": "PHP Implementation of the Visual Studio Code Language Server Protocol",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Felix Becker",
|
||||
"email": "felix.b@outlook.com"
|
||||
}
|
||||
],
|
||||
"license": "ISC",
|
||||
"type": "library",
|
||||
"keywords": [
|
||||
"php",
|
||||
"language",
|
||||
|
@ -21,27 +14,29 @@
|
|||
"autocompletion",
|
||||
"refactor"
|
||||
],
|
||||
"bin": ["bin/php-language-server.php"],
|
||||
"scripts": {
|
||||
"parse-stubs": "LanguageServer\\ComposerScripts::parseStubs",
|
||||
"post-install-cmd": "@parse-stubs"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Felix Becker",
|
||||
"email": "felix.b@outlook.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.0",
|
||||
"phpdocumentor/reflection-docblock": "~3.1.1",
|
||||
"sabre/event": "^5.0",
|
||||
"felixfbecker/advanced-json-rpc": "^2.0",
|
||||
"squizlabs/php_codesniffer" : "3.0.0RC3",
|
||||
"netresearch/jsonmapper": "^1.0",
|
||||
"webmozart/path-util": "^2.3",
|
||||
"webmozart/glob": "^4.1",
|
||||
"sabre/uri": "^2.0",
|
||||
"jetbrains/phpstorm-stubs": "dev-master",
|
||||
"php": "^7.0",
|
||||
"composer/composer": "^1.3",
|
||||
"Microsoft/tolerant-php-parser": "^0.0.4"
|
||||
"felixfbecker/advanced-json-rpc": "^3.0.0",
|
||||
"jetbrains/phpstorm-stubs": "dev-master",
|
||||
"microsoft/tolerant-php-parser": "0.0.*",
|
||||
"netresearch/jsonmapper": "^1.0",
|
||||
"phpdocumentor/reflection-docblock": "^4.0.0",
|
||||
"sabre/event": "^5.0",
|
||||
"sabre/uri": "^2.0",
|
||||
"webmozart/glob": "^4.1",
|
||||
"webmozart/path-util": "^2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.3",
|
||||
"squizlabs/php_codesniffer": "^3.1"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"LanguageServer\\": "src/"
|
||||
|
@ -57,8 +52,19 @@
|
|||
"LanguageServer\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.5",
|
||||
"phpunit/php-code-coverage": "^4.0"
|
||||
}
|
||||
"bin": [
|
||||
"bin/php-language-server.php"
|
||||
],
|
||||
"scripts": {
|
||||
"parse-stubs": "LanguageServer\\ComposerScripts::parseStubs",
|
||||
"post-install-cmd": "@parse-stubs",
|
||||
"post-update-cmd": "@parse-stubs",
|
||||
"test": "vendor/bin/phpunit",
|
||||
"lint": "vendor/bin/phpcs"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
collectors:
|
||||
|
||||
- type: php-composer
|
||||
path: /
|
||||
actors:
|
||||
# pull requests for new major versions
|
||||
- type: php-composer
|
||||
versions: "Y.0.0"
|
||||
settings:
|
||||
commit_message_prefix: "chore: "
|
|
@ -0,0 +1 @@
|
|||
<
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace TestNamespace;
|
||||
|
||||
use SomeNamespace\Goo;
|
||||
|
||||
|
||||
class TestClass
|
||||
{
|
||||
public $testProperty;
|
||||
|
||||
public function testMethod($testParameter)
|
||||
{
|
||||
$testVariable = 123;
|
||||
|
||||
if (empty($testParameter)){
|
||||
echo 'Empty';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace TestNamespace;
|
||||
|
||||
use SomeNamespace\Goo;
|
||||
|
||||
class TestClass
|
||||
{
|
||||
public $testProperty;
|
||||
|
||||
public function testMethod($testParameter)
|
||||
{
|
||||
$testVariable = 123;
|
||||
|
||||
if (empty($testParameter)) {
|
||||
echo 'Empty';
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "php-language-server",
|
||||
"version": "0.0.0-development",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"commitmsg": "validate-commit-msg",
|
||||
"semantic-release": "semantic-release pre && php release-docker.php && semantic-release post"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cz-conventional-changelog": "^2.0.0",
|
||||
"husky": "^0.14.3",
|
||||
"last-release-git": "0.0.3",
|
||||
"semantic-release": "^8.2.0",
|
||||
"validate-commit-msg": "^2.14.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"release": {
|
||||
"getLastRelease": "last-release-git"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/felixfbecker/php-language-server.git"
|
||||
}
|
||||
}
|
|
@ -1,14 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="vendor/autoload.php">
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
failOnWarning="true"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
verbose="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="PHP Language Server Test Suite">
|
||||
<directory>./tests</directory>
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>./src</directory>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./src</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
$dockerEmail = getenv('DOCKER_EMAIL');
|
||||
$dockerUsername = getenv('DOCKER_USERNAME');
|
||||
$dockerPassword = getenv('DOCKER_PASSWORD');
|
||||
$version = json_decode(file_get_contents(__DIR__ . '/package.json'))->version;
|
||||
|
||||
system("docker login -e=$dockerEmail -u=$dockerUsername -p=$dockerPassword");
|
||||
system("docker build -t felixfbecker/php-language-server:latest .");
|
||||
system("docker tag felixfbecker/php-language-server:latest felixfbecker/php-language-server:$version .");
|
||||
system("docker push felixfbecker/php-language-server:$version");
|
||||
system("docker push felixfbecker/php-language-server:latest");
|
|
@ -71,7 +71,6 @@ class ClientHandler
|
|||
*/
|
||||
public function notify(string $method, $params): Promise
|
||||
{
|
||||
$id = $this->idGenerator->generate();
|
||||
return $this->protocolWriter->write(
|
||||
new Protocol\Message(
|
||||
new AdvancedJsonRpc\Notification($method, (object)$params)
|
||||
|
|
|
@ -10,7 +10,9 @@ use LanguageServer\Protocol\{
|
|||
Position,
|
||||
CompletionList,
|
||||
CompletionItem,
|
||||
CompletionItemKind
|
||||
CompletionItemKind,
|
||||
CompletionContext,
|
||||
CompletionTriggerKind
|
||||
};
|
||||
use Microsoft\PhpParser;
|
||||
use Microsoft\PhpParser\Node;
|
||||
|
@ -122,9 +124,10 @@ class CompletionProvider
|
|||
*
|
||||
* @param PhpDocument $doc The opened document
|
||||
* @param Position $pos The cursor position
|
||||
* @param CompletionContext $context The completion context
|
||||
* @return CompletionList
|
||||
*/
|
||||
public function provideCompletion(PhpDocument $doc, Position $pos): CompletionList
|
||||
public function provideCompletion(PhpDocument $doc, Position $pos, CompletionContext $context = null): CompletionList
|
||||
{
|
||||
// This can be made much more performant if the tree follows specific invariants.
|
||||
$node = $doc->getNodeAtPosition($pos);
|
||||
|
@ -152,7 +155,21 @@ class CompletionProvider
|
|||
|
||||
// Inspect the type of expression under the cursor
|
||||
|
||||
if ($node === null || $node instanceof Node\Statement\InlineHtml || $pos == new Position(0, 0)) {
|
||||
$content = $doc->getContent();
|
||||
$offset = $pos->toOffset($content);
|
||||
if (
|
||||
$node === null
|
||||
|| (
|
||||
$node instanceof Node\Statement\InlineHtml
|
||||
&& (
|
||||
$context === null
|
||||
// Make sure to not suggest on the > trigger character in HTML
|
||||
|| $context->triggerKind === CompletionTriggerKind::INVOKED
|
||||
|| $context->triggerCharacter === '<'
|
||||
)
|
||||
)
|
||||
|| $pos == new Position(0, 0)
|
||||
) {
|
||||
// HTML, beginning of file
|
||||
|
||||
// Inside HTML and at the beginning of the file, propose <?php
|
||||
|
@ -210,7 +227,7 @@ class CompletionProvider
|
|||
// Collect all definitions that match any of the prefixes
|
||||
foreach ($this->index->getDefinitions() as $fqn => $def) {
|
||||
foreach ($prefixes as $prefix) {
|
||||
if (substr($fqn, 0, strlen($prefix)) === $prefix && !$def->isGlobal) {
|
||||
if (substr($fqn, 0, strlen($prefix)) === $prefix && $def->isMember) {
|
||||
$list->items[] = CompletionItem::fromDefinition($def);
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +260,7 @@ class CompletionProvider
|
|||
// Collect all definitions that match any of the prefixes
|
||||
foreach ($this->index->getDefinitions() as $fqn => $def) {
|
||||
foreach ($prefixes as $prefix) {
|
||||
if (substr(strtolower($fqn), 0, strlen($prefix)) === strtolower($prefix) && !$def->isGlobal) {
|
||||
if (substr(strtolower($fqn), 0, strlen($prefix)) === strtolower($prefix) && $def->isMember) {
|
||||
$list->items[] = CompletionItem::fromDefinition($def);
|
||||
}
|
||||
}
|
||||
|
@ -316,7 +333,7 @@ class CompletionProvider
|
|||
|
||||
if (
|
||||
// Exclude methods, properties etc.
|
||||
$def->isGlobal
|
||||
!$def->isMember
|
||||
&& (
|
||||
!$prefix
|
||||
|| (
|
||||
|
@ -415,7 +432,7 @@ class CompletionProvider
|
|||
|
||||
// Walk the AST upwards until a scope boundary is met
|
||||
$level = $node;
|
||||
while ($level && !ParserHelpers\isFunctionLike($level)) {
|
||||
while ($level && !($level instanceof PhpParser\FunctionLike)) {
|
||||
// Walk siblings before the node
|
||||
$sibling = $level;
|
||||
while ($sibling = $sibling->getPreviousSibling()) {
|
||||
|
@ -429,7 +446,7 @@ class CompletionProvider
|
|||
|
||||
// If the traversal ended because a function was met,
|
||||
// also add its parameters and closure uses to the result list
|
||||
if ($level && ParserHelpers\isFunctionLike($level) && $level->parameters !== null) {
|
||||
if ($level && $level instanceof PhpParser\FunctionLike && $level->parameters !== null) {
|
||||
foreach ($level->parameters->getValues() as $param) {
|
||||
$paramName = $param->getName();
|
||||
if (empty($namePrefix) || strpos($paramName, $namePrefix) !== false) {
|
||||
|
|
|
@ -56,7 +56,8 @@ class ComposerScripts
|
|||
$parts['scheme'] = 'phpstubs';
|
||||
$uri = Uri\build($parts);
|
||||
|
||||
$document = new PhpDocument($uri, $content, $index, $parser, $docBlockFactory, $definitionResolver);
|
||||
// Create a new document and add it to $index
|
||||
new PhpDocument($uri, $content, $index, $parser, $docBlockFactory, $definitionResolver);
|
||||
}
|
||||
|
||||
$index->setComplete();
|
||||
|
|
|
@ -40,12 +40,13 @@ class Definition
|
|||
public $extends;
|
||||
|
||||
/**
|
||||
* Only true for classes, interfaces, traits, functions and non-class constants
|
||||
* False for classes, interfaces, traits, functions and non-class constants
|
||||
* True for methods, properties and class constants
|
||||
* This is so methods and properties are not suggested in the global scope
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $isGlobal;
|
||||
public $isMember;
|
||||
|
||||
/**
|
||||
* True if this definition is affected by global namespace fallback (global function or global constant)
|
||||
|
@ -79,7 +80,7 @@ class Definition
|
|||
* For functions and methods, this is the return type.
|
||||
* For any other declaration it will be null.
|
||||
* Can also be a compound type.
|
||||
* If it is unknown, will be Types\Mixed.
|
||||
* If it is unknown, will be Types\Mixed_.
|
||||
*
|
||||
* @var \phpDocumentor\Type|null
|
||||
*/
|
||||
|
|
|
@ -185,10 +185,8 @@ class DefinitionResolver
|
|||
);
|
||||
|
||||
// Interfaces, classes, traits, namespaces, functions, and global const elements
|
||||
$def->isGlobal = (
|
||||
$node instanceof Node\Statement\InterfaceDeclaration ||
|
||||
$node instanceof Node\Statement\ClassDeclaration ||
|
||||
$node instanceof Node\Statement\TraitDeclaration ||
|
||||
$def->isMember = !(
|
||||
$node instanceof PhpParser\ClassLike ||
|
||||
|
||||
($node instanceof Node\Statement\NamespaceDefinition && $node->name !== null) ||
|
||||
|
||||
|
@ -529,7 +527,7 @@ class DefinitionResolver
|
|||
// Traverse the AST up
|
||||
do {
|
||||
// If a function is met, check the parameters and use statements
|
||||
if (ParserHelpers\isFunctionLike($n)) {
|
||||
if ($n instanceof PhpParser\FunctionLike) {
|
||||
if ($n->parameters !== null) {
|
||||
foreach ($n->parameters->getElements() as $param) {
|
||||
if ($param->getName() === $name) {
|
||||
|
@ -569,7 +567,7 @@ class DefinitionResolver
|
|||
|
||||
/**
|
||||
* Given an expression node, resolves that expression recursively to a type.
|
||||
* If the type could not be resolved, returns Types\Mixed.
|
||||
* If the type could not be resolved, returns Types\Mixed_.
|
||||
*
|
||||
* @param Node\Expression $expr
|
||||
* @return \phpDocumentor\Reflection\Type|null
|
||||
|
@ -585,7 +583,7 @@ class DefinitionResolver
|
|||
if ($expr == null || $expr instanceof PhpParser\MissingToken || $expr instanceof PhpParser\SkippedToken) {
|
||||
// TODO some members are null or Missing/SkippedToken
|
||||
// How do we handle this more generally?
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
|
||||
// VARIABLE
|
||||
|
@ -615,7 +613,7 @@ class DefinitionResolver
|
|||
// Find the function definition
|
||||
if ($expr->callableExpression instanceof Node\Expression) {
|
||||
// Cannot get type for dynamic function call
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
|
||||
if ($expr->callableExpression instanceof Node\QualifiedName) {
|
||||
|
@ -664,7 +662,7 @@ class DefinitionResolver
|
|||
// MEMBER ACCESS EXPRESSION
|
||||
if ($expr instanceof Node\Expression\MemberAccessExpression) {
|
||||
if ($expr->memberName instanceof Node\Expression) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
$var = $expr->dereferencableExpression;
|
||||
|
||||
|
@ -677,10 +675,10 @@ class DefinitionResolver
|
|||
if ($t instanceof Types\This) {
|
||||
$classFqn = self::getContainingClassFqn($expr);
|
||||
if ($classFqn === null) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
} else if (!($t instanceof Types\Object_) || $t->getFqsen() === null) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
} else {
|
||||
$classFqn = substr((string)$t->getFqsen(), 1);
|
||||
}
|
||||
|
@ -707,7 +705,7 @@ class DefinitionResolver
|
|||
if ($expr instanceof Node\Expression\ScopedPropertyAccessExpression) {
|
||||
$classType = $this->resolveClassNameToType($expr->scopeResolutionQualifier);
|
||||
if (!($classType instanceof Types\Object_) || $classType->getFqsen() === null) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
$fqn = substr((string)$classType->getFqsen(), 1) . '::';
|
||||
|
||||
|
@ -719,7 +717,7 @@ class DefinitionResolver
|
|||
|
||||
$def = $this->index->getDefinition($fqn);
|
||||
if ($def === null) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
return $def->type;
|
||||
}
|
||||
|
@ -906,7 +904,7 @@ class DefinitionResolver
|
|||
if ($expr instanceof Node\Expression\SubscriptExpression) {
|
||||
$varType = $this->resolveExpressionNodeToType($expr->postfixExpression);
|
||||
if (!($varType instanceof Types\Array_)) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
return $varType->getValueType();
|
||||
}
|
||||
|
@ -915,14 +913,14 @@ class DefinitionResolver
|
|||
// include, require, include_once, require_once
|
||||
if ($expr instanceof Node\Expression\ScriptInclusionExpression) {
|
||||
// TODO: resolve path to PhpDocument and find return statement
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
|
||||
if ($expr instanceof Node\QualifiedName) {
|
||||
return $this->resolveClassNameToType($expr);
|
||||
}
|
||||
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
|
||||
|
||||
|
@ -936,7 +934,7 @@ class DefinitionResolver
|
|||
public function resolveClassNameToType($class): Type
|
||||
{
|
||||
if ($class instanceof Node\Expression) {
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
if ($class instanceof PhpParser\Token && $class->kind === PhpParser\TokenKind::ClassKeyword) {
|
||||
// Anonymous class
|
||||
|
@ -976,7 +974,7 @@ class DefinitionResolver
|
|||
* For classes and interfaces, this is the class type (object).
|
||||
* For variables / assignments, this is the documented type or type the assignment resolves to.
|
||||
* Can also be a compound type.
|
||||
* If it is unknown, will be Types\Mixed.
|
||||
* If it is unknown, will be Types\Mixed_.
|
||||
* Returns null if the node does not have a type.
|
||||
*
|
||||
* @param Node $node
|
||||
|
@ -1030,7 +1028,7 @@ class DefinitionResolver
|
|||
}
|
||||
$type = $defaultType;
|
||||
}
|
||||
return $type ?? new Types\Mixed;
|
||||
return $type ?? new Types\Mixed_;
|
||||
}
|
||||
|
||||
// FUNCTIONS AND METHODS
|
||||
|
@ -1038,7 +1036,7 @@ class DefinitionResolver
|
|||
// 1. doc block
|
||||
// 2. return type hint
|
||||
// 3. TODO: infer from return statements
|
||||
if (ParserHelpers\isFunctionLike($node)) {
|
||||
if ($node instanceof PhpParser\FunctionLike) {
|
||||
// Functions/methods
|
||||
$docBlock = $this->getDocBlock($node);
|
||||
if (
|
||||
|
@ -1058,7 +1056,7 @@ class DefinitionResolver
|
|||
return new Types\Object_(new Fqsen('\\' . (string)$node->returnType->getResolvedName()));
|
||||
}
|
||||
// Unknown return type
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
|
||||
// PROPERTIES, CONSTS, CLASS CONSTS, ASSIGNMENT EXPRESSIONS
|
||||
|
@ -1095,7 +1093,7 @@ class DefinitionResolver
|
|||
// TODO: read @property tags of class
|
||||
// TODO: Try to infer the type from default value / constant value
|
||||
// Unknown
|
||||
return new Types\Mixed;
|
||||
return new Types\Mixed_;
|
||||
}
|
||||
|
||||
// The node does not have a type
|
||||
|
@ -1119,9 +1117,7 @@ class DefinitionResolver
|
|||
// interface C { } A\B\C
|
||||
// trait C { } A\B\C
|
||||
if (
|
||||
$node instanceof Node\Statement\ClassDeclaration ||
|
||||
$node instanceof Node\Statement\InterfaceDeclaration ||
|
||||
$node instanceof Node\Statement\TraitDeclaration
|
||||
$node instanceof PhpParser\ClassLike
|
||||
) {
|
||||
return (string) $node->getNamespacedName();
|
||||
}
|
||||
|
@ -1152,9 +1148,7 @@ class DefinitionResolver
|
|||
// Class method: use ClassName->methodName() as name
|
||||
$class = $node->getFirstAncestor(
|
||||
Node\Expression\ObjectCreationExpression::class,
|
||||
Node\Statement\ClassDeclaration::class,
|
||||
Node\Statement\InterfaceDeclaration::class,
|
||||
Node\Statement\TraitDeclaration::class
|
||||
PhpParser\ClassLike::class
|
||||
);
|
||||
if (!isset($class->name)) {
|
||||
// Ignore anonymous classes
|
||||
|
@ -1178,9 +1172,7 @@ class DefinitionResolver
|
|||
($classDeclaration =
|
||||
$node->getFirstAncestor(
|
||||
Node\Expression\ObjectCreationExpression::class,
|
||||
Node\Statement\ClassDeclaration::class,
|
||||
Node\Statement\InterfaceDeclaration::class,
|
||||
Node\Statement\TraitDeclaration::class
|
||||
PhpParser\ClassLike::class
|
||||
)
|
||||
) !== null && isset($classDeclaration->name)) {
|
||||
$name = $node->getName();
|
||||
|
@ -1208,9 +1200,7 @@ class DefinitionResolver
|
|||
// Class constant: use ClassName::CONSTANT_NAME as name
|
||||
$classDeclaration = $constDeclaration->getFirstAncestor(
|
||||
Node\Expression\ObjectCreationExpression::class,
|
||||
Node\Statement\ClassDeclaration::class,
|
||||
Node\Statement\InterfaceDeclaration::class,
|
||||
Node\Statement\TraitDeclaration::class
|
||||
PhpParser\ClassLike::class
|
||||
);
|
||||
|
||||
if (!isset($classDeclaration->name)) {
|
||||
|
|
|
@ -1,107 +0,0 @@
|
|||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace LanguageServer;
|
||||
|
||||
use LanguageServer\Protocol\{
|
||||
TextEdit,
|
||||
Range,
|
||||
Position
|
||||
};
|
||||
use Exception;
|
||||
use PHP_CodeSniffer\{
|
||||
Config,
|
||||
Ruleset
|
||||
};
|
||||
use PHP_CodeSniffer\Files\DummyFile;
|
||||
use PHP_CodeSniffer\Util\Tokens;
|
||||
|
||||
abstract class Formatter
|
||||
{
|
||||
|
||||
/**
|
||||
* Generate array of TextEdit changes for content formatting.
|
||||
*
|
||||
* @param string $content source code to format
|
||||
* @param string $uri URI of document
|
||||
*
|
||||
* @return \LanguageServer\Protocol\TextEdit[]
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function format(string $content, string $uri)
|
||||
{
|
||||
if (!defined('PHP_CODESNIFFER_CBF')) {
|
||||
define('PHP_CODESNIFFER_CBF', true);
|
||||
}
|
||||
|
||||
if (!defined('PHP_CODESNIFFER_VERBOSITY')) {
|
||||
define('PHP_CODESNIFFER_VERBOSITY', false);
|
||||
}
|
||||
|
||||
$path = uriToPath($uri);
|
||||
$config = new Config(['dummy'], false);
|
||||
$config->standards = self::findConfiguration($path);
|
||||
|
||||
// Autoload class to set up a bunch of PHP_CodeSniffer-specific token type constants
|
||||
spl_autoload_call(Tokens::class);
|
||||
|
||||
$file = new DummyFile($content, new Ruleset($config), $config);
|
||||
$file->process();
|
||||
$fixed = $file->fixer->fixFile();
|
||||
if (!$fixed && $file->getErrorCount() > 0) {
|
||||
throw new Exception('Unable to format file');
|
||||
}
|
||||
|
||||
$new = $file->fixer->getContents();
|
||||
if ($content === $new) {
|
||||
return [];
|
||||
}
|
||||
return [new TextEdit(new Range(new Position(0, 0), self::calculateEndPosition($content)), $new)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate position of last character.
|
||||
*
|
||||
* @param string $content document as string
|
||||
*
|
||||
* @return \LanguageServer\Protocol\Position
|
||||
*/
|
||||
private static function calculateEndPosition(string $content): Position
|
||||
{
|
||||
$lines = explode("\n", $content);
|
||||
return new Position(count($lines) - 1, strlen(end($lines)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for PHP_CodeSniffer configuration file at given directory or its parents.
|
||||
* If no configuration found then PSR2 standard is loaded by default.
|
||||
*
|
||||
* @param string $path path to file or directory
|
||||
* @return string[]
|
||||
*/
|
||||
private static function findConfiguration(string $path)
|
||||
{
|
||||
if (is_dir($path)) {
|
||||
$currentDir = $path;
|
||||
} else {
|
||||
$currentDir = dirname($path);
|
||||
}
|
||||
do {
|
||||
$default = $currentDir . DIRECTORY_SEPARATOR . 'phpcs.xml';
|
||||
if (is_file($default)) {
|
||||
return [$default];
|
||||
}
|
||||
|
||||
$default = $currentDir . DIRECTORY_SEPARATOR . 'phpcs.xml.dist';
|
||||
if (is_file($default)) {
|
||||
return [$default];
|
||||
}
|
||||
|
||||
$lastDir = $currentDir;
|
||||
$currentDir = dirname($currentDir);
|
||||
} while ($currentDir !== '.' && $currentDir !== $lastDir);
|
||||
|
||||
$standard = Config::getConfigData('default_standard') ?? 'PSR2';
|
||||
return explode(',', $standard);
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ function getFqnsFromType($type): array
|
|||
}
|
||||
if ($type instanceof Types\Compound) {
|
||||
for ($i = 0; $t = $type->get($i); $i++) {
|
||||
foreach (getFqnsFromType($type) as $fqn) {
|
||||
foreach (getFqnsFromType($t) as $fqn) {
|
||||
$fqns[] = $fqn;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ use function Sabre\Event\coroutine;
|
|||
class Indexer
|
||||
{
|
||||
/**
|
||||
* @var The prefix for every cache item
|
||||
* @var int The prefix for every cache item
|
||||
*/
|
||||
const CACHE_VERSION = 1;
|
||||
const CACHE_VERSION = 2;
|
||||
|
||||
/**
|
||||
* @var FilesFinder
|
||||
|
|
|
@ -266,8 +266,6 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
$serverCapabilities->documentSymbolProvider = true;
|
||||
// Support "Find all symbols in workspace"
|
||||
$serverCapabilities->workspaceSymbolProvider = true;
|
||||
// Support "Format Code"
|
||||
$serverCapabilities->documentFormattingProvider = true;
|
||||
// Support "Go to definition"
|
||||
$serverCapabilities->definitionProvider = true;
|
||||
// Support "Find all references"
|
||||
|
|
|
@ -25,7 +25,7 @@ function isConstantFetch(Node $node) : bool
|
|||
$parent instanceof Node\Expression\CallExpression ||
|
||||
$parent instanceof Node\Expression\ObjectCreationExpression ||
|
||||
$parent instanceof Node\Expression\ScopedPropertyAccessExpression ||
|
||||
isFunctionLike($parent) ||
|
||||
$parent instanceof PhpParser\FunctionLike ||
|
||||
(
|
||||
$parent instanceof Node\Expression\BinaryExpression &&
|
||||
$parent->operator->kind === PhpParser\TokenKind::InstanceOfKeyword
|
||||
|
@ -38,14 +38,6 @@ function getFunctionLikeDeclarationFromParameter(Node\Parameter $node)
|
|||
return $node->parent->parent;
|
||||
}
|
||||
|
||||
function isFunctionLike(Node $node)
|
||||
{
|
||||
return
|
||||
$node instanceof Node\Statement\FunctionDeclaration ||
|
||||
$node instanceof Node\MethodDeclaration ||
|
||||
$node instanceof Node\Expression\AnonymousFunctionCreationExpression;
|
||||
}
|
||||
|
||||
function isBooleanExpression($expression) : bool
|
||||
{
|
||||
if (!($expression instanceof Node\Expression\BinaryExpression)) {
|
||||
|
|
|
@ -166,19 +166,6 @@ class PhpDocument
|
|||
$this->sourceFileNode = $treeAnalyzer->getSourceFileNode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns array of TextEdit changes to format this document.
|
||||
*
|
||||
* @return \LanguageServer\Protocol\TextEdit[]
|
||||
*/
|
||||
public function getFormattedText()
|
||||
{
|
||||
if (empty($this->getContent())) {
|
||||
return [];
|
||||
}
|
||||
return Formatter::format($this->getContent(), $this->uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this document's text content.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace LanguageServer\Protocol;
|
||||
|
||||
/**
|
||||
* Contains additional information about the context in which a completion request is triggered.
|
||||
*/
|
||||
class CompletionContext
|
||||
{
|
||||
/**
|
||||
* How the completion was triggered.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $triggerKind;
|
||||
|
||||
/**
|
||||
* The trigger character (a single character) that has trigger code complete.
|
||||
* Is null if `triggerKind !== CompletionTriggerKind::TRIGGER_CHARACTER`
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
public $triggerCharacter;
|
||||
|
||||
public function __construct(int $triggerKind, string $triggerCharacter = null)
|
||||
{
|
||||
$this->triggerKind = $triggerKind;
|
||||
$this->triggerCharacter = $triggerCharacter;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace LanguageServer\Protocol;
|
||||
|
||||
class CompletionTriggerKind
|
||||
{
|
||||
/**
|
||||
* Completion was triggered by invoking it manuall or using API.
|
||||
*/
|
||||
const INVOKED = 1;
|
||||
|
||||
/**
|
||||
* Completion was triggered by a trigger character.
|
||||
*/
|
||||
const TRIGGER_CHARACTER = 2;
|
||||
}
|
|
@ -7,7 +7,7 @@ namespace LanguageServer\Protocol;
|
|||
* special attention. Usually a document highlight is visualized by changing
|
||||
* the background color of its range.
|
||||
*/
|
||||
class DocumentHighlightKind
|
||||
class DocumentHighlight
|
||||
{
|
||||
/**
|
||||
* The range this highlight applies to.
|
||||
|
|
|
@ -20,7 +20,8 @@ use LanguageServer\Protocol\{
|
|||
SymbolLocationInformation,
|
||||
TextDocumentIdentifier,
|
||||
TextDocumentItem,
|
||||
VersionedTextDocumentIdentifier
|
||||
VersionedTextDocumentIdentifier,
|
||||
CompletionContext
|
||||
};
|
||||
use Microsoft\PhpParser;
|
||||
use Microsoft\PhpParser\Node;
|
||||
|
@ -156,7 +157,7 @@ class TextDocument
|
|||
* The document's truth now exists where the document's uri points to (e.g. if the document's uri is a file uri the
|
||||
* truth now exists on disk).
|
||||
*
|
||||
* @param \LanguageServer\Protocol\TextDocumentItem $textDocument The document that was closed
|
||||
* @param \LanguageServer\Protocol\TextDocumentIdentifier $textDocument The document that was closed
|
||||
* @return void
|
||||
*/
|
||||
public function didClose(TextDocumentIdentifier $textDocument)
|
||||
|
@ -164,20 +165,6 @@ class TextDocument
|
|||
$this->documentLoader->close($textDocument->uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* The document formatting request is sent from the server to the client to format a whole document.
|
||||
*
|
||||
* @param TextDocumentIdentifier $textDocument The document to format
|
||||
* @param FormattingOptions $options The format options
|
||||
* @return Promise <TextEdit[]>
|
||||
*/
|
||||
public function formatting(TextDocumentIdentifier $textDocument, FormattingOptions $options)
|
||||
{
|
||||
return $this->documentLoader->getOrLoad($textDocument->uri)->then(function (PhpDocument $document) {
|
||||
return $document->getFormattedText();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* The references request is sent from the client to the server to resolve project-wide references for the symbol
|
||||
* denoted by the given text document position.
|
||||
|
@ -354,13 +341,14 @@ class TextDocument
|
|||
*
|
||||
* @param TextDocumentIdentifier The text document
|
||||
* @param Position $position The position
|
||||
* @param CompletionContext|null $context The completion context
|
||||
* @return Promise <CompletionItem[]|CompletionList>
|
||||
*/
|
||||
public function completion(TextDocumentIdentifier $textDocument, Position $position): Promise
|
||||
public function completion(TextDocumentIdentifier $textDocument, Position $position, CompletionContext $context = null): Promise
|
||||
{
|
||||
return coroutine(function () use ($textDocument, $position) {
|
||||
return coroutine(function () use ($textDocument, $position, $context) {
|
||||
$document = yield $this->documentLoader->getOrLoad($textDocument->uri);
|
||||
return $this->completionProvider->provideCompletion($document, $position);
|
||||
return $this->completionProvider->provideCompletion($document, $position, $context);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@ class Workspace
|
|||
*/
|
||||
public function xreferences($query, array $files = null): Promise
|
||||
{
|
||||
// TODO: $files is unused in the coroutine
|
||||
return coroutine(function () use ($query, $files) {
|
||||
if ($this->composerLock === null) {
|
||||
return [];
|
||||
|
|
|
@ -9,12 +9,19 @@ use phpDocumentor\Reflection\DocBlockFactory;
|
|||
use Sabre\Uri;
|
||||
use Microsoft\PhpParser;
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class TreeAnalyzer
|
||||
{
|
||||
/** @var PhpParser\Parser */
|
||||
private $parser;
|
||||
|
||||
/** @var DocBlockFactory */
|
||||
private $docBlockFactory;
|
||||
|
||||
/** @var DefinitionResolver */
|
||||
private $definitionResolver;
|
||||
|
||||
/** @var Node\SourceFileNode */
|
||||
private $sourceFileNode;
|
||||
|
||||
|
@ -49,44 +56,73 @@ class TreeAnalyzer
|
|||
|
||||
// TODO - docblock errors
|
||||
|
||||
$this->collectDefinitionsAndReferences($this->sourceFileNode);
|
||||
$this->traverse($this->sourceFileNode);
|
||||
}
|
||||
|
||||
private function collectDefinitionsAndReferences(Node $sourceFileNode)
|
||||
/**
|
||||
* Collects Parser diagnostic messages for the Node/Token
|
||||
* and transforms them into LSP Format
|
||||
*
|
||||
* @param Node|Token $node
|
||||
* @return void
|
||||
*/
|
||||
private function collectDiagnostics($node)
|
||||
{
|
||||
foreach ($sourceFileNode::CHILD_NAMES as $name) {
|
||||
$node = $sourceFileNode->$name;
|
||||
if (($error = PhpParser\DiagnosticsProvider::checkDiagnostics($node)) !== null) {
|
||||
$range = PhpParser\PositionUtilities::getRangeFromPosition($error->start, $error->length, $this->sourceFileNode->fileContents);
|
||||
|
||||
if ($node === null) {
|
||||
continue;
|
||||
switch ($error->kind) {
|
||||
case PhpParser\DiagnosticKind::Error:
|
||||
$severity = DiagnosticSeverity::ERROR;
|
||||
break;
|
||||
case PhpParser\DiagnosticKind::Warning:
|
||||
default:
|
||||
$severity = DiagnosticSeverity::WARNING;
|
||||
break;
|
||||
}
|
||||
|
||||
if (\is_array($node)) {
|
||||
foreach ($node as $child) {
|
||||
if ($child instanceof Node) {
|
||||
$this->update($child);
|
||||
}
|
||||
$this->diagnostics[] = new Diagnostic(
|
||||
$error->message,
|
||||
new Range(
|
||||
new Position($range->start->line, $range->start->character),
|
||||
new Position($range->end->line, $range->start->character)
|
||||
),
|
||||
null,
|
||||
$severity,
|
||||
'php'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive AST traversal to collect definitions/references and diagnostics
|
||||
*
|
||||
* @param Node|Token $currentNode The node/token to process
|
||||
*/
|
||||
private function traverse($currentNode)
|
||||
{
|
||||
$this->collectDiagnostics($currentNode);
|
||||
|
||||
// Only update/descend into Nodes, Tokens are leaves
|
||||
if ($currentNode instanceof Node) {
|
||||
$this->collectDefinitionsAndReferences($currentNode);
|
||||
|
||||
foreach ($currentNode::CHILD_NAMES as $name) {
|
||||
$child = $currentNode->$name;
|
||||
|
||||
if ($child === null) {
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($node instanceof Node) {
|
||||
$this->update($node);
|
||||
}
|
||||
|
||||
if (($error = PhpParser\DiagnosticsProvider::checkDiagnostics($node)) !== null) {
|
||||
$range = PhpParser\PositionUtilities::getRangeFromPosition($error->start, $error->length, $this->sourceFileNode->fileContents);
|
||||
|
||||
$this->diagnostics[] = new Diagnostic(
|
||||
$error->message,
|
||||
new Range(
|
||||
new Position($range->start->line, $range->start->character),
|
||||
new Position($range->end->line, $range->start->character)
|
||||
),
|
||||
null,
|
||||
DiagnosticSeverity::ERROR,
|
||||
'php'
|
||||
);
|
||||
if (\is_array($child)) {
|
||||
foreach ($child as $actualChild) {
|
||||
if ($actualChild !== null) {
|
||||
$this->traverse($actualChild);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->traverse($child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +132,7 @@ class TreeAnalyzer
|
|||
*
|
||||
* @param Node $node
|
||||
*/
|
||||
private function update(Node $node)
|
||||
private function collectDefinitionsAndReferences(Node $node)
|
||||
{
|
||||
$fqn = ($this->definitionResolver)::getDefinedFqn($node);
|
||||
// Only index definitions with an FQN (no variables)
|
||||
|
@ -152,7 +188,6 @@ class TreeAnalyzer
|
|||
}
|
||||
}
|
||||
}
|
||||
$this->collectDefinitionsAndReferences($node);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -175,7 +210,7 @@ class TreeAnalyzer
|
|||
}
|
||||
|
||||
/**
|
||||
* @return Definition
|
||||
* @return Definition[]
|
||||
*/
|
||||
public function getDefinitions()
|
||||
{
|
||||
|
|
|
@ -148,9 +148,8 @@ function isVendored(PhpDocument $document, \stdClass $composerJson = null): bool
|
|||
* Check a given URI against the composer.json to see if it
|
||||
* is a vendored URI
|
||||
*
|
||||
* @param \stdClass|null $composerJson
|
||||
* @param string $uri
|
||||
* @param array $matches
|
||||
* @param \stdClass|null $composerJson
|
||||
* @return string|null
|
||||
*/
|
||||
function getPackageName(string $uri, \stdClass $composerJson = null)
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace LanguageServer\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use LanguageServer\Formatter;
|
||||
|
||||
class FormatterTest extends TestCase
|
||||
{
|
||||
|
||||
public function testFormat()
|
||||
{
|
||||
$input = file_get_contents(__DIR__ . '/../fixtures/format.php');
|
||||
$output = file_get_contents(__DIR__ . '/../fixtures/format_expected.php');
|
||||
|
||||
$edits = Formatter::format($input, 'file:///whatever');
|
||||
$this->assertSame($output, $edits[0]->newText);
|
||||
}
|
||||
|
||||
public function testFormatNoChange()
|
||||
{
|
||||
$expected = file_get_contents(__DIR__ . '/../fixtures/format_expected.php');
|
||||
|
||||
$edits = Formatter::format($expected, 'file:///whatever');
|
||||
$this->assertSame([], $edits);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace LanguageServer\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use LanguageServer\Index\Index;
|
||||
use LanguageServer\Definition;
|
||||
|
||||
class IndexTest extends TestCase
|
||||
{
|
||||
public function testGetSetMethodDefinition()
|
||||
{
|
||||
$index = new Index;
|
||||
$index->setDefinition('SomeNamespace\SomeClass', new Definition);
|
||||
$methodDefinition = new Definition;
|
||||
$methodFqn = 'SomeNamespace\SomeClass->someMethod()';
|
||||
$index->setDefinition($methodFqn, $methodDefinition);
|
||||
$index->setDefinition('SomeNamespace\SomeClass->someProperty', new Definition);
|
||||
$this->assertSame($methodDefinition, $index->getDefinition($methodFqn));
|
||||
}
|
||||
|
||||
public function testGetSetClassDefinition()
|
||||
{
|
||||
$index = new Index;
|
||||
$definition = new Definition;
|
||||
$fqn = 'SomeNamespace\SomeClass';
|
||||
$index->setDefinition($fqn, $definition);
|
||||
$this->assertSame($definition, $index->getDefinition($fqn));
|
||||
}
|
||||
}
|
|
@ -35,7 +35,6 @@ class LanguageServerTest extends TestCase
|
|||
$serverCapabilities->textDocumentSync = TextDocumentSyncKind::FULL;
|
||||
$serverCapabilities->documentSymbolProvider = true;
|
||||
$serverCapabilities->workspaceSymbolProvider = true;
|
||||
$serverCapabilities->documentFormattingProvider = true;
|
||||
$serverCapabilities->definitionProvider = true;
|
||||
$serverCapabilities->referencesProvider = true;
|
||||
$serverCapabilities->hoverProvider = true;
|
||||
|
|
|
@ -17,7 +17,9 @@ use LanguageServer\Protocol\{
|
|||
Position,
|
||||
CompletionList,
|
||||
CompletionItem,
|
||||
CompletionItemKind
|
||||
CompletionItemKind,
|
||||
CompletionContext,
|
||||
CompletionTriggerKind
|
||||
};
|
||||
use function LanguageServer\pathToUri;
|
||||
|
||||
|
@ -464,6 +466,41 @@ class CompletionTest extends TestCase
|
|||
], true), $items);
|
||||
}
|
||||
|
||||
public function testHtmlPrefixShouldNotTriggerCompletion()
|
||||
{
|
||||
$completionUri = pathToUri(__DIR__ . '/../../../fixtures/completion/html_no_completion.php');
|
||||
$this->loader->open($completionUri, file_get_contents($completionUri));
|
||||
$items = $this->textDocument->completion(
|
||||
new TextDocumentIdentifier($completionUri),
|
||||
new Position(0, 1),
|
||||
new CompletionContext(CompletionTriggerKind::TRIGGER_CHARACTER, '>')
|
||||
)->wait();
|
||||
$this->assertEquals(new CompletionList([], true), $items);
|
||||
}
|
||||
|
||||
public function testHtmlPrefixShouldTriggerCompletionIfManuallyInvoked()
|
||||
{
|
||||
$completionUri = pathToUri(__DIR__ . '/../../../fixtures/completion/html_no_completion.php');
|
||||
$this->loader->open($completionUri, file_get_contents($completionUri));
|
||||
$items = $this->textDocument->completion(
|
||||
new TextDocumentIdentifier($completionUri),
|
||||
new Position(0, 1),
|
||||
new CompletionContext(CompletionTriggerKind::INVOKED)
|
||||
)->wait();
|
||||
$this->assertEquals(new CompletionList([
|
||||
new CompletionItem(
|
||||
'<?php',
|
||||
CompletionItemKind::KEYWORD,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
new TextEdit(new Range(new Position(0, 1), new Position(0, 1)), '?php')
|
||||
)
|
||||
], true), $items);
|
||||
}
|
||||
|
||||
public function testNamespace()
|
||||
{
|
||||
$completionUri = pathToUri(__DIR__ . '/../../../fixtures/completion/namespace.php');
|
||||
|
@ -605,7 +642,7 @@ class CompletionTest extends TestCase
|
|||
)
|
||||
], true), $items);
|
||||
}
|
||||
|
||||
|
||||
public function testThisWithPrefix()
|
||||
{
|
||||
$completionUri = pathToUri(__DIR__ . '/../../../fixtures/completion/this_with_prefix.php');
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace LanguageServer\Tests\Server\TextDocument;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use LanguageServer\Tests\MockProtocolStream;
|
||||
use LanguageServer\{
|
||||
Server, LanguageClient, PhpDocumentLoader, DefinitionResolver
|
||||
};
|
||||
use LanguageServer\Index\{Index, ProjectIndex, DependenciesIndex};
|
||||
use LanguageServer\ContentRetriever\FileSystemContentRetriever;
|
||||
use LanguageServer\Protocol\{
|
||||
TextDocumentIdentifier,
|
||||
TextDocumentItem,
|
||||
FormattingOptions,
|
||||
TextEdit,
|
||||
Range,
|
||||
Position
|
||||
};
|
||||
use function LanguageServer\{pathToUri, uriToPath};
|
||||
|
||||
class FormattingTest extends TestCase
|
||||
{
|
||||
public function testFormatting()
|
||||
{
|
||||
$projectIndex = new ProjectIndex(new Index, new DependenciesIndex);
|
||||
$client = new LanguageClient(new MockProtocolStream, new MockProtocolStream);
|
||||
$definitionResolver = new DefinitionResolver($projectIndex);
|
||||
$loader = new PhpDocumentLoader(new FileSystemContentRetriever, $projectIndex, $definitionResolver);
|
||||
$textDocument = new Server\TextDocument($loader, $definitionResolver, $client, $projectIndex);
|
||||
|
||||
$path = realpath(__DIR__ . '/../../../fixtures/format.php');
|
||||
$uri = pathToUri($path);
|
||||
|
||||
// Trigger parsing of source
|
||||
$textDocumentItem = new TextDocumentItem();
|
||||
$textDocumentItem->uri = $uri;
|
||||
$textDocumentItem->languageId = 'php';
|
||||
$textDocumentItem->version = 1;
|
||||
$textDocumentItem->text = file_get_contents($path);
|
||||
$textDocument->didOpen($textDocumentItem);
|
||||
|
||||
// how code should look after formatting
|
||||
$expected = file_get_contents(__DIR__ . '/../../../fixtures/format_expected.php');
|
||||
// Request formatting
|
||||
$result = $textDocument->formatting(new TextDocumentIdentifier($uri), new FormattingOptions())->wait();
|
||||
$this->assertEquals([new TextEdit(new Range(new Position(0, 0), new Position(20, 0)), $expected)], $result);
|
||||
}
|
||||
}
|
|
@ -96,7 +96,9 @@ class ValidationTest extends TestCase
|
|||
$testCasesDir = realpath(__DIR__ . '/cases');
|
||||
foreach ($refsAndDefs['references'] as $key => $list) {
|
||||
$fixedPathRefs = array_map(function ($ref) use ($testCasesDir) {
|
||||
return str_replace($testCasesDir, '.', $ref);
|
||||
$ref = str_replace($testCasesDir, '.', $ref);
|
||||
$ref = str_replace(DIRECTORY_SEPARATOR, '/', $ref);
|
||||
return $ref;
|
||||
}, $list);
|
||||
|
||||
$refsAndDefs['references']->$key = $fixedPathRefs;
|
||||
|
@ -107,6 +109,7 @@ class ValidationTest extends TestCase
|
|||
if ($def !== null && $def->symbolInformation !== null &&
|
||||
$def->symbolInformation->location !== null && $def->symbolInformation->location->uri !== null) {
|
||||
$def->symbolInformation->location->uri = str_replace($testCasesDir, '.', $def->symbolInformation->location->uri);
|
||||
$def->symbolInformation->location->uri = str_replace(DIRECTORY_SEPARATOR, '/', $def->symbolInformation->location->uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"Fixtures\\Prophecy": {
|
||||
"fqn": "Fixtures\\Prophecy",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -42,7 +42,7 @@
|
|||
"extends": [
|
||||
"Fixtures\\Prophecy\\EmptyClass"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -62,7 +62,7 @@
|
|||
"Fixtures\\Prophecy\\WithReturnTypehints->getSelf()": {
|
||||
"fqn": "Fixtures\\Prophecy\\WithReturnTypehints->getSelf()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -83,7 +83,7 @@
|
|||
"Fixtures\\Prophecy\\WithReturnTypehints->getName()": {
|
||||
"fqn": "Fixtures\\Prophecy\\WithReturnTypehints->getName()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -104,7 +104,7 @@
|
|||
"Fixtures\\Prophecy\\WithReturnTypehints->getParent()": {
|
||||
"fqn": "Fixtures\\Prophecy\\WithReturnTypehints->getParent()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -24,7 +24,7 @@
|
|||
"A->foo": {
|
||||
"fqn": "A->foo",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"TestNamespace": {
|
||||
"fqn": "TestNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"TestNamespace\\A": {
|
||||
"fqn": "TestNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"TestNamespace\\A->a": {
|
||||
"fqn": "TestNamespace\\A->a",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"TestNamespace": {
|
||||
"fqn": "TestNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"TestNamespace\\TestClass": {
|
||||
"fqn": "TestNamespace\\TestClass",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"TestNamespace\\TestClass->testProperty": {
|
||||
"fqn": "TestNamespace\\TestClass->testProperty",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -72,7 +72,7 @@
|
|||
"TestNamespace\\TestClass->testMethod()": {
|
||||
"fqn": "TestNamespace\\TestClass->testMethod()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A::suite()": {
|
||||
"fqn": "MyNamespace\\A::suite()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A::suite()": {
|
||||
"fqn": "MyNamespace\\A::suite()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A::suite()": {
|
||||
"fqn": "MyNamespace\\A::suite()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A->suite()": {
|
||||
"fqn": "MyNamespace\\A->suite()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"MyNamespace\\Mbstring": {
|
||||
"fqn": "MyNamespace\\Mbstring",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -48,7 +48,7 @@
|
|||
"MyNamespace\\Mbstring::MB_CASE_FOLD": {
|
||||
"fqn": "MyNamespace\\Mbstring::MB_CASE_FOLD",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"A->b()": {
|
||||
"fqn": "A->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"B": {
|
||||
"fqn": "B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"A::$deprecationsTriggered": {
|
||||
"fqn": "A::$deprecationsTriggered",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A::a()": {
|
||||
"fqn": "MyNamespace\\A::a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A::a()": {
|
||||
"fqn": "MyNamespace\\A::a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -46,7 +46,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -66,7 +66,7 @@
|
|||
"MyNamespace\\A::getInitializer()": {
|
||||
"fqn": "MyNamespace\\A::getInitializer()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -37,7 +37,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -57,7 +57,7 @@
|
|||
"MyNamespace\\A->testRequest()": {
|
||||
"fqn": "MyNamespace\\A->testRequest()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"MyNamespace\\ParseErrorsTest": {
|
||||
"fqn": "MyNamespace\\ParseErrorsTest",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -48,7 +48,7 @@
|
|||
"MyNamespace\\ParseErrorsTest->setUp()": {
|
||||
"fqn": "MyNamespace\\ParseErrorsTest->setUp()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\ParseErrorsTest": {
|
||||
"fqn": "MyNamespace\\ParseErrorsTest",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\ParseErrorsTest->setAccount()": {
|
||||
"fqn": "MyNamespace\\ParseErrorsTest->setAccount()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"FooClass": {
|
||||
"fqn": "FooClass",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"FooClass->foo()": {
|
||||
"fqn": "FooClass->foo()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"MyNamespace1": {
|
||||
"fqn": "MyNamespace1",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -37,7 +37,7 @@
|
|||
"MyNamespace1\\B": {
|
||||
"fqn": "MyNamespace1\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -57,7 +57,7 @@
|
|||
"MyNamespace1\\B->b()": {
|
||||
"fqn": "MyNamespace1\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -78,7 +78,7 @@
|
|||
"MyNamespace2": {
|
||||
"fqn": "MyNamespace2",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -100,7 +100,7 @@
|
|||
"extends": [
|
||||
"MyNamespace2\\MyNamespace1\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -120,7 +120,7 @@
|
|||
"MyNamespace2\\A->a()": {
|
||||
"fqn": "MyNamespace2\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Foo": {
|
||||
"fqn": "Foo",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -24,7 +24,7 @@
|
|||
"Foo->fn()": {
|
||||
"fqn": "Foo->fn()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -24,7 +24,7 @@
|
|||
"A->b()": {
|
||||
"fqn": "A->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"MyNamespace1": {
|
||||
"fqn": "MyNamespace1",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"B": {
|
||||
"fqn": "B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"A\\B": {
|
||||
"fqn": "A\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"LanguageServer\\Tests\\Utils": {
|
||||
"fqn": "LanguageServer\\Tests\\Utils",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -48,7 +48,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -71,7 +71,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"A->a()": {
|
||||
"fqn": "A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"MyNamespace\\init()": {
|
||||
"fqn": "MyNamespace\\init()",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -74,7 +74,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -94,7 +94,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"MyClass": {
|
||||
"fqn": "MyClass",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -24,7 +24,7 @@
|
|||
"MyClass->mainPropertyName": {
|
||||
"fqn": "MyClass->mainPropertyName",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"MyClass": {
|
||||
"fqn": "MyClass",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -24,7 +24,7 @@
|
|||
"MyClass->mainPropertyName": {
|
||||
"fqn": "MyClass->mainPropertyName",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"TestNamespace": {
|
||||
"fqn": "TestNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"TestNamespace\\whatever()": {
|
||||
"fqn": "TestNamespace\\whatever()",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"MyNamespace\\A::a()": {
|
||||
"fqn": "MyNamespace\\A::a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"A": {
|
||||
"fqn": "A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"A::$a": {
|
||||
"fqn": "A::$a",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"TestClass": {
|
||||
"fqn": "TestClass",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -37,7 +37,7 @@
|
|||
"TestClass::$testProperty": {
|
||||
"fqn": "TestClass::$testProperty",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -43,7 +43,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -63,7 +63,7 @@
|
|||
"MyNamespace\\A::suite()": {
|
||||
"fqn": "MyNamespace\\A::suite()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"MyNamespace\\A": {
|
||||
"fqn": "MyNamespace\\A",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -48,7 +48,7 @@
|
|||
"MyNamespace\\A->typesProvider()": {
|
||||
"fqn": "MyNamespace\\A->typesProvider()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"MyNamespace\\B": {
|
||||
"fqn": "MyNamespace\\B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MyNamespace\\B->b()": {
|
||||
"fqn": "MyNamespace\\B->b()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -77,7 +77,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -97,7 +97,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"MyNamespace": {
|
||||
"fqn": "MyNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -30,7 +30,7 @@
|
|||
"extends": [
|
||||
"MyNamespace\\B"
|
||||
],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -50,7 +50,7 @@
|
|||
"MyNamespace\\A->a()": {
|
||||
"fqn": "MyNamespace\\A->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"FooClass": {
|
||||
"fqn": "FooClass",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -28,7 +28,7 @@
|
|||
"FooClass::staticFoo()": {
|
||||
"fqn": "FooClass::staticFoo()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": true,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -49,7 +49,7 @@
|
|||
"FooClass->bar()": {
|
||||
"fqn": "FooClass->bar()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{
|
||||
"references": [],
|
||||
"references": {
|
||||
"B->hi": [
|
||||
"./stringVariable.php"
|
||||
]
|
||||
},
|
||||
"definitions": {
|
||||
"B": {
|
||||
"fqn": "B",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -24,7 +28,7 @@
|
|||
"B->hi": {
|
||||
"fqn": "B->hi",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -45,7 +49,7 @@
|
|||
"B->a()": {
|
||||
"fqn": "B->a()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"SomeNamespace": {
|
||||
"fqn": "SomeNamespace",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"Foo": {
|
||||
"fqn": "Foo",
|
||||
"extends": [],
|
||||
"isGlobal": true,
|
||||
"isMember": false,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": true,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"Foo->bar": {
|
||||
"fqn": "Foo->bar",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
@ -52,7 +52,7 @@
|
|||
"Foo->foo()": {
|
||||
"fqn": "Foo->foo()",
|
||||
"extends": [],
|
||||
"isGlobal": false,
|
||||
"isMember": true,
|
||||
"roamed": false,
|
||||
"isStatic": false,
|
||||
"canBeInstantiated": false,
|
||||
|
|
Loading…
Reference in New Issue