diff --git a/tests/Validation/ValidationTest.php b/tests/Validation/ValidationTest.php index a7d98b8..9f292d6 100644 --- a/tests/Validation/ValidationTest.php +++ b/tests/Validation/ValidationTest.php @@ -34,9 +34,10 @@ class ValidationTest extends TestCase } $iterator = new RecursiveDirectoryIterator(__DIR__ . "/../../validation/frameworks/" . $frameworkName); + $skipped = json_decode(file_get_contents(__DIR__ . '/skipped.json')); foreach (new RecursiveIteratorIterator($iterator) as $file) { - if (strpos(\strrev((string)$file), \strrev(".php")) === 0) { + if (strpos(\strrev((string)$file), \strrev(".php")) === 0 && !\in_array(basename((string)$file), $skipped)) { if ($file->getSize() < 100000) { $testProviderArray[$frameworkName . "::" . $file->getBasename()] = [$file->getPathname(), $frameworkName]; } diff --git a/tests/Validation/skipped.json b/tests/Validation/skipped.json new file mode 100644 index 0000000..901c77a --- /dev/null +++ b/tests/Validation/skipped.json @@ -0,0 +1,6 @@ +[ + "forLoopReference1.php", + "namespaces3.php", + "parameterTypeResolution1.php", + "parent2.php" +] \ No newline at end of file diff --git a/validation/frameworks/broken/ArrayNodeDefinition.php b/validation/frameworks/broken/ArrayNodeDefinition.php deleted file mode 100644 index 4ad218b..0000000 --- a/validation/frameworks/broken/ArrayNodeDefinition.php +++ /dev/null @@ -1,549 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; - -/** - * This class provides a fluent interface for defining an array node. - * - * @author Johannes M. Schmitt - */ -class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface -{ - protected $performDeepMerging = true; - protected $ignoreExtraKeys = false; - protected $removeExtraKeys = true; - protected $children = array(); - protected $prototype; - protected $atLeastOne = false; - protected $allowNewKeys = true; - protected $key; - protected $removeKeyItem; - protected $addDefaults = false; - protected $addDefaultChildren = false; - protected $nodeBuilder; - protected $normalizeKeys = true; - - /** - * {@inheritdoc} - */ - public function __construct($name, NodeParentInterface $parent = null) - { - parent::__construct($name, $parent); - - $this->nullEquivalent = array(); - $this->trueEquivalent = array(); - } - - /** - * Sets a custom children builder. - * - * @param NodeBuilder $builder A custom NodeBuilder - */ - public function setBuilder(NodeBuilder $builder) - { - $this->nodeBuilder = $builder; - } - - /** - * Returns a builder to add children nodes. - * - * @return NodeBuilder - */ - public function children() - { - return $this->getNodeBuilder(); - } - - /** - * Sets a prototype for child nodes. - * - * @param string $type the type of node - * - * @return NodeDefinition - */ - public function prototype($type) - { - return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this); - } - - /** - * @return VariableNodeDefinition - */ - public function variablePrototype() - { - return $this->prototype('variable'); - } - - /** - * @return ScalarNodeDefinition - */ - public function scalarPrototype() - { - return $this->prototype('scalar'); - } - - /** - * @return BooleanNodeDefinition - */ - public function booleanPrototype() - { - return $this->prototype('boolean'); - } - - /** - * @return IntegerNodeDefinition - */ - public function integerPrototype() - { - return $this->prototype('integer'); - } - - /** - * @return FloatNodeDefinition - */ - public function floatPrototype() - { - return $this->prototype('float'); - } - - /** - * @return ArrayNodeDefinition - */ - public function arrayPrototype() - { - return $this->prototype('array'); - } - - /** - * @return EnumNodeDefinition - */ - public function enumPrototype() - { - return $this->prototype('enum'); - } - - /** - * Adds the default value if the node is not set in the configuration. - * - * This method is applicable to concrete nodes only (not to prototype nodes). - * If this function has been called and the node is not set during the finalization - * phase, it's default value will be derived from its children default values. - * - * @return ArrayNodeDefinition - */ - public function addDefaultsIfNotSet() - { - $this->addDefaults = true; - - return $this; - } - - /** - * Adds children with a default value when none are defined. - * - * @param int|string|array|null $children The number of children|The child name|The children names to be added - * - * This method is applicable to prototype nodes only. - * - * @return ArrayNodeDefinition - */ - public function addDefaultChildrenIfNoneSet($children = null) - { - $this->addDefaultChildren = $children; - - return $this; - } - - /** - * Requires the node to have at least one element. - * - * This method is applicable to prototype nodes only. - * - * @return ArrayNodeDefinition - */ - public function requiresAtLeastOneElement() - { - $this->atLeastOne = true; - - return $this; - } - - /** - * Disallows adding news keys in a subsequent configuration. - * - * If used all keys have to be defined in the same configuration file. - * - * @return ArrayNodeDefinition - */ - public function disallowNewKeysInSubsequentConfigs() - { - $this->allowNewKeys = false; - - return $this; - } - - /** - * Sets a normalization rule for XML configurations. - * - * @param string $singular The key to remap - * @param string $plural The plural of the key for irregular plurals - * - * @return ArrayNodeDefinition - */ - public function fixXmlConfig($singular, $plural = null) - { - $this->normalization()->remap($singular, $plural); - - return $this; - } - - /** - * Sets the attribute which value is to be used as key. - * - * This is useful when you have an indexed array that should be an - * associative array. You can select an item from within the array - * to be the key of the particular item. For example, if "id" is the - * "key", then: - * - * array( - * array('id' => 'my_name', 'foo' => 'bar'), - * ); - * - * becomes - * - * array( - * 'my_name' => array('foo' => 'bar'), - * ); - * - * If you'd like "'id' => 'my_name'" to still be present in the resulting - * array, then you can set the second argument of this method to false. - * - * This method is applicable to prototype nodes only. - * - * @param string $name The name of the key - * @param bool $removeKeyItem Whether or not the key item should be removed - * - * @return ArrayNodeDefinition - */ - public function useAttributeAsKey($name, $removeKeyItem = true) - { - $this->key = $name; - $this->removeKeyItem = $removeKeyItem; - - return $this; - } - - /** - * Sets whether the node can be unset. - * - * @param bool $allow - * - * @return ArrayNodeDefinition - */ - public function canBeUnset($allow = true) - { - $this->merge()->allowUnset($allow); - - return $this; - } - - /** - * Adds an "enabled" boolean to enable the current section. - * - * By default, the section is disabled. If any configuration is specified then - * the node will be automatically enabled: - * - * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden - * enableableArrayNode: ~ # The config is enabled & use the default values - * enableableArrayNode: true # The config is enabled & use the default values - * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden - * enableableArrayNode: {enabled: false, ...} # The config is disabled - * enableableArrayNode: false # The config is disabled - * - * @return ArrayNodeDefinition - */ - public function canBeEnabled() - { - $this - ->addDefaultsIfNotSet() - ->treatFalseLike(array('enabled' => false)) - ->treatTrueLike(array('enabled' => true)) - ->treatNullLike(array('enabled' => true)) - ->beforeNormalization() - ->ifArray() - ->then(function ($v) { - $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true; - - return $v; - }) - ->end() - ->children() - ->booleanNode('enabled') - ->defaultFalse() - ; - - return $this; - } - - /** - * Adds an "enabled" boolean to enable the current section. - * - * By default, the section is enabled. - * - * @return ArrayNodeDefinition - */ - public function canBeDisabled() - { - $this - ->addDefaultsIfNotSet() - ->treatFalseLike(array('enabled' => false)) - ->treatTrueLike(array('enabled' => true)) - ->treatNullLike(array('enabled' => true)) - ->children() - ->booleanNode('enabled') - ->defaultTrue() - ; - - return $this; - } - - /** - * Disables the deep merging of the node. - * - * @return ArrayNodeDefinition - */ - public function performNoDeepMerging() - { - $this->performDeepMerging = false; - - return $this; - } - - /** - * Allows extra config keys to be specified under an array without - * throwing an exception. - * - * Those config values are simply ignored and removed from the - * resulting array. This should be used only in special cases where - * you want to send an entire configuration array through a special - * tree that processes only part of the array. - * - * @param bool $remove Whether to remove the extra keys - * - * @return ArrayNodeDefinition - */ - public function ignoreExtraKeys($remove = true) - { - $this->ignoreExtraKeys = true; - $this->removeExtraKeys = $remove; - - return $this; - } - - /** - * Sets key normalization. - * - * @param bool $bool Whether to enable key normalization - * - * @return ArrayNodeDefinition - */ - public function normalizeKeys($bool) - { - $this->normalizeKeys = (bool) $bool; - - return $this; - } - - /** - * Appends a node definition. - * - * $node = new ArrayNodeDefinition() - * ->children() - * ->scalarNode('foo')->end() - * ->scalarNode('baz')->end() - * ->end() - * ->append($this->getBarNodeDefinition()) - * ; - * - * @param NodeDefinition $node A NodeDefinition instance - * - * @return ArrayNodeDefinition This node - */ - public function append(NodeDefinition $node) - { - $this->children[$node->name] = $node->setParent($this); - - return $this; - } - - /** - * Returns a node builder to be used to add children and prototype. - * - * @return NodeBuilder The node builder - */ - protected function getNodeBuilder() - { - if (null === $this->nodeBuilder) { - $this->nodeBuilder = new NodeBuilder(); - } - - return $this->nodeBuilder->setParent($this); - } - - /** - * {@inheritdoc} - */ - protected function createNode() - { - if (null === $this->prototype) { - $node = new ArrayNode($this->name, $this->parent); - - $this->validateConcreteNode($node); - - $node->setAddIfNotSet($this->addDefaults); - - foreach ($this->children as $child) { - $child->parent = $node; - $node->addChild($child->getNode()); - } - } else { - $node = new PrototypedArrayNode($this->name, $this->parent); - - $this->validatePrototypeNode($node); - - if (null !== $this->key) { - $node->setKeyAttribute($this->key, $this->removeKeyItem); - } - - if (true === $this->atLeastOne) { - $node->setMinNumberOfElements(1); - } - - if ($this->default) { - $node->setDefaultValue($this->defaultValue); - } - - if (false !== $this->addDefaultChildren) { - $node->setAddChildrenIfNoneSet($this->addDefaultChildren); - if ($this->prototype instanceof static && null === $this->prototype->prototype) { - $this->prototype->addDefaultsIfNotSet(); - } - } - - $this->prototype->parent = $node; - $node->setPrototype($this->prototype->getNode()); - } - - $node->setAllowNewKeys($this->allowNewKeys); - $node->addEquivalentValue(null, $this->nullEquivalent); - $node->addEquivalentValue(true, $this->trueEquivalent); - $node->addEquivalentValue(false, $this->falseEquivalent); - $node->setPerformDeepMerging($this->performDeepMerging); - $node->setRequired($this->required); - $node->setIgnoreExtraKeys($this->ignoreExtraKeys, $this->removeExtraKeys); - $node->setNormalizeKeys($this->normalizeKeys); - - if (null !== $this->normalization) { - $node->setNormalizationClosures($this->normalization->before); - $node->setXmlRemappings($this->normalization->remappings); - } - - if (null !== $this->merge) { - $node->setAllowOverwrite($this->merge->allowOverwrite); - $node->setAllowFalse($this->merge->allowFalse); - } - - if (null !== $this->validation) { - $node->setFinalValidationClosures($this->validation->rules); - } - - return $node; - } - - /** - * Validate the configuration of a concrete node. - * - * @param ArrayNode $node The related node - * - * @throws InvalidDefinitionException - */ - protected function validateConcreteNode(ArrayNode $node) - { - $path = $node->getPath(); - - if (null !== $this->key) { - throw new InvalidDefinitionException( - sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path) - ); - } - - if (true === $this->atLeastOne) { - throw new InvalidDefinitionException( - sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s"', $path) - ); - } - - if ($this->default) { - throw new InvalidDefinitionException( - sprintf('->defaultValue() is not applicable to concrete nodes at path "%s"', $path) - ); - } - - if (false !== $this->addDefaultChildren) { - throw new InvalidDefinitionException( - sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s"', $path) - ); - } - } - - /** - * Validate the configuration of a prototype node. - * - * @param PrototypedArrayNode $node The related node - * - * @throws InvalidDefinitionException - */ - protected function validatePrototypeNode(PrototypedArrayNode $node) - { - $path = $node->getPath(); - - if ($this->addDefaults) { - throw new InvalidDefinitionException( - sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s"', $path) - ); - } - - if (false !== $this->addDefaultChildren) { - if ($this->default) { - throw new InvalidDefinitionException( - sprintf('A default value and default children might not be used together at path "%s"', $path) - ); - } - - if (null !== $this->key && (null === $this->addDefaultChildren || is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) { - throw new InvalidDefinitionException( - sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s"', $path) - ); - } - - if (null === $this->key && (is_string($this->addDefaultChildren) || is_array($this->addDefaultChildren))) { - throw new InvalidDefinitionException( - sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s"', $path) - ); - } - } - } -} diff --git a/validation/frameworks/broken/WithReturnTypehints.php.expected.json b/validation/frameworks/broken/WithReturnTypehints.php.expected.json new file mode 100644 index 0000000..f9c2430 --- /dev/null +++ b/validation/frameworks/broken/WithReturnTypehints.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "Fixtures\\Prophecy\\EmptyClass": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + ], + "self": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + ], + "parent": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + ] + }, + "definitions": { + "Fixtures\\Prophecy": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "Fixtures\\Prophecy", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + }, + "containerName": "Fixtures" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "Fixtures\\Prophecy\\WithReturnTypehints": { + "extends": [ + "Fixtures\\Prophecy\\EmptyClass" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "WithReturnTypehints", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + }, + "containerName": "Fixtures\\Prophecy" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "Fixtures\\Prophecy\\WithReturnTypehints->getSelf()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "getSelf", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + }, + "containerName": "Fixtures\\Prophecy\\WithReturnTypehints" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "Fixtures\\Prophecy\\WithReturnTypehints->getName()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "getName", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + }, + "containerName": "Fixtures\\Prophecy\\WithReturnTypehints" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\String_", + "type": {}, + "documentation": null + }, + "Fixtures\\Prophecy\\WithReturnTypehints->getParent()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "getParent", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/WithReturnTypehints.php" + }, + "containerName": "Fixtures\\Prophecy\\WithReturnTypehints" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/anonymousClassMembersShouldNotBeSymbols.php.expected.json b/validation/frameworks/broken/anonymousClassMembersShouldNotBeSymbols.php.expected.json new file mode 100644 index 0000000..dc579f9 --- /dev/null +++ b/validation/frameworks/broken/anonymousClassMembersShouldNotBeSymbols.php.expected.json @@ -0,0 +1,22 @@ +{ + "references": [], + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/anonymousClassMembersShouldNotBeSymbols.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/arrayValueShouldBeBoolean.php b/validation/frameworks/broken/arrayValueShouldBeBoolean.php new file mode 100644 index 0000000..bd5ff49 --- /dev/null +++ b/validation/frameworks/broken/arrayValueShouldBeBoolean.php @@ -0,0 +1,4 @@ + TRUE]; +} \ No newline at end of file diff --git a/validation/frameworks/broken/arrayValueShouldBeBoolean.php.expected.json b/validation/frameworks/broken/arrayValueShouldBeBoolean.php.expected.json new file mode 100644 index 0000000..9faade7 --- /dev/null +++ b/validation/frameworks/broken/arrayValueShouldBeBoolean.php.expected.json @@ -0,0 +1,39 @@ +{ + "references": [], + "definitions": { + "A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/arrayValueShouldBeBoolean.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "A->foo": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "foo", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/arrayValueShouldBeBoolean.php" + }, + "containerName": "A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Array_", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/caseStatement1.php.expected.json b/validation/frameworks/broken/caseStatement1.php.expected.json new file mode 100644 index 0000000..e8400af --- /dev/null +++ b/validation/frameworks/broken/caseStatement1.php.expected.json @@ -0,0 +1,29 @@ +{ + "references": { + "MyNamespace\\A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/caseStatement1.php" + ], + "A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/caseStatement1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/caseStatement1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/classDefinition1.php.expected.json b/validation/frameworks/broken/classDefinition1.php.expected.json new file mode 100644 index 0000000..c505348 --- /dev/null +++ b/validation/frameworks/broken/classDefinition1.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "TestNamespace\\A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classDefinition1.php" + ], + "TestNamespace\\A->a": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classDefinition1.php" + ] + }, + "definitions": { + "TestNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "TestNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classDefinition1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "TestNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classDefinition1.php" + }, + "containerName": "TestNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "TestNamespace\\A->a": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classDefinition1.php" + }, + "containerName": "TestNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Integer", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/classProperty1.php.expected.json b/validation/frameworks/broken/classProperty1.php.expected.json new file mode 100644 index 0000000..cce5b15 --- /dev/null +++ b/validation/frameworks/broken/classProperty1.php.expected.json @@ -0,0 +1,80 @@ +{ + "references": { + "SomeNamespace\\Goo": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classProperty1.php" + ], + "SomeNamespace": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classProperty1.php" + ] + }, + "definitions": { + "TestNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "TestNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classProperty1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "TestNamespace\\TestClass": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "TestClass", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classProperty1.php" + }, + "containerName": "TestNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "TestNamespace\\TestClass->testProperty": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "testProperty", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classProperty1.php" + }, + "containerName": "TestNamespace\\TestClass" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "TestNamespace\\TestClass->testMethod()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "testMethod", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/classProperty1.php" + }, + "containerName": "TestNamespace\\TestClass" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/constants.php.expected.json b/validation/frameworks/broken/constants.php.expected.json new file mode 100644 index 0000000..be3094d --- /dev/null +++ b/validation/frameworks/broken/constants.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\BYE": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants.php" + ], + "BYE": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::suite()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "suite", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/constants2.php.expected.json b/validation/frameworks/broken/constants2.php.expected.json new file mode 100644 index 0000000..1e35fd3 --- /dev/null +++ b/validation/frameworks/broken/constants2.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\BYE": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants2.php" + ], + "BYE": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::suite()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "suite", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants2.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/constants3.php.expected.json b/validation/frameworks/broken/constants3.php.expected.json new file mode 100644 index 0000000..cba6091 --- /dev/null +++ b/validation/frameworks/broken/constants3.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\T_NEW": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants3.php" + ], + "T_NEW": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants3.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::suite()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "suite", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants3.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/constants4.php.expected.json b/validation/frameworks/broken/constants4.php.expected.json new file mode 100644 index 0000000..7585f03 --- /dev/null +++ b/validation/frameworks/broken/constants4.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\HI": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants4.php" + ], + "HI": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants4.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants4.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants4.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->suite()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "suite", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants4.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/constants5.php.expected.json b/validation/frameworks/broken/constants5.php.expected.json new file mode 100644 index 0000000..189b1cb --- /dev/null +++ b/validation/frameworks/broken/constants5.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\PHP_INT_MAX": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants5.php" + ], + "PHP_INT_MAX": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants5.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants5.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\Mbstring": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "Mbstring", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants5.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\Mbstring::MB_CASE_FOLD": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MB_CASE_FOLD", + "kind": 14, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constants5.php" + }, + "containerName": "MyNamespace\\Mbstring" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/constantsInFunctionParamDefault.php.expected.json b/validation/frameworks/broken/constantsInFunctionParamDefault.php.expected.json new file mode 100644 index 0000000..15be350 --- /dev/null +++ b/validation/frameworks/broken/constantsInFunctionParamDefault.php.expected.json @@ -0,0 +1,43 @@ +{ + "references": { + "MY_CONSTANT": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constantsInFunctionParamDefault.php" + ] + }, + "definitions": { + "A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "A", + "kind": 11, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constantsInFunctionParamDefault.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "A->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/constantsInFunctionParamDefault.php" + }, + "containerName": "A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/docBlocksOnNamespaceDefinition.php.expected.json b/validation/frameworks/broken/docBlocksOnNamespaceDefinition.php.expected.json new file mode 100644 index 0000000..e4660b7 --- /dev/null +++ b/validation/frameworks/broken/docBlocksOnNamespaceDefinition.php.expected.json @@ -0,0 +1,22 @@ +{ + "references": [], + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/docBlocksOnNamespaceDefinition.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/exceptions1.php.expected.json b/validation/frameworks/broken/exceptions1.php.expected.json new file mode 100644 index 0000000..1cf37fc --- /dev/null +++ b/validation/frameworks/broken/exceptions1.php.expected.json @@ -0,0 +1,22 @@ +{ + "references": [], + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/exceptions1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/forLoopReference1.php b/validation/frameworks/broken/forLoopReference1.php index a51d1ad..438323f 100644 --- a/validation/frameworks/broken/forLoopReference1.php +++ b/validation/frameworks/broken/forLoopReference1.php @@ -1,8 +1,12 @@ getParent()) { +class ForLoopReference1 { + public function getThat() { + for ($that = $this; null !== $that; $that = $that->foo()) { } } + + public function foo() { + return $this; + } } diff --git a/validation/frameworks/broken/forLoopReference1.php.expected.json b/validation/frameworks/broken/forLoopReference1.php.expected.json new file mode 100644 index 0000000..66da6eb --- /dev/null +++ b/validation/frameworks/broken/forLoopReference1.php.expected.json @@ -0,0 +1,60 @@ +{ + "references": { + "ForLoopReference1->foo()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/forLoopReference1.php" + ] + }, + "definitions": { + "ForLoopReference1": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "ForLoopReference1", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/forLoopReference1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "ForLoopReference1->getThat()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "getThat", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/forLoopReference1.php" + }, + "containerName": "ForLoopReference1" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "ForLoopReference1->foo()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "foo", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/forLoopReference1.php" + }, + "containerName": "ForLoopReference1" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/functionCall.php b/validation/frameworks/broken/functionCall.php deleted file mode 100644 index 121e84b..0000000 --- a/validation/frameworks/broken/functionCall.php +++ /dev/null @@ -1,53 +0,0 @@ -b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/functionUse.php" + ] + }, + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/functionUse2.php.expected.json b/validation/frameworks/broken/functionUse2.php.expected.json new file mode 100644 index 0000000..dfb66d5 --- /dev/null +++ b/validation/frameworks/broken/functionUse2.php.expected.json @@ -0,0 +1,11 @@ +{ + "references": { + "LanguageServer": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/functionUse2.php" + ], + "LanguageServer\\timeout": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/functionUse2.php" + ] + }, + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/ifStatement1.php.expected.json b/validation/frameworks/broken/ifStatement1.php.expected.json new file mode 100644 index 0000000..4e4a23f --- /dev/null +++ b/validation/frameworks/broken/ifStatement1.php.expected.json @@ -0,0 +1,29 @@ +{ + "references": { + "MyNamespace\\A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/ifStatement1.php" + ], + "A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/ifStatement1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/ifStatement1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/magicConstantsShouldBeGlobal.php.expected.json b/validation/frameworks/broken/magicConstantsShouldBeGlobal.php.expected.json new file mode 100644 index 0000000..363fc5f --- /dev/null +++ b/validation/frameworks/broken/magicConstantsShouldBeGlobal.php.expected.json @@ -0,0 +1,22 @@ +{ + "references": [], + "definitions": { + "B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "B", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/magicConstantsShouldBeGlobal.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/magicConsts.php.expected.json b/validation/frameworks/broken/magicConsts.php.expected.json new file mode 100644 index 0000000..222b0b6 --- /dev/null +++ b/validation/frameworks/broken/magicConsts.php.expected.json @@ -0,0 +1,39 @@ +{ + "references": [], + "definitions": { + "A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/magicConsts.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "A::$deprecationsTriggered": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "deprecationsTriggered", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/magicConsts.php" + }, + "containerName": "A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Array_", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/memberAccess1.php.expected.json b/validation/frameworks/broken/memberAccess1.php.expected.json new file mode 100644 index 0000000..59b2fa2 --- /dev/null +++ b/validation/frameworks/broken/memberAccess1.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\a": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess1.php" + ], + "MyNamespace\\a->a()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::a()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess1.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/memberAccess2.php.expected.json b/validation/frameworks/broken/memberAccess2.php.expected.json new file mode 100644 index 0000000..c3b9335 --- /dev/null +++ b/validation/frameworks/broken/memberAccess2.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\a": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess2.php" + ], + "MyNamespace\\a->a()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::a()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess2.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/memberAccess3.php.expected.json b/validation/frameworks/broken/memberAccess3.php.expected.json new file mode 100644 index 0000000..9026d38 --- /dev/null +++ b/validation/frameworks/broken/memberAccess3.php.expected.json @@ -0,0 +1,78 @@ +{ + "references": { + "MyNamespace\\ClassLoader": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ], + "Closure::bind()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ], + "Closure": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ], + "MyNamespace\\ClassLoader->prefixesPsr0": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ], + "MyNamespace\\ComposerStaticInitIncludePath::$prefixesPsr0": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ], + "MyNamespace\\ComposerStaticInitIncludePath": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ], + "MyNamespace\\ClassLoader::class": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::getInitializer()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "getInitializer", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess3.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/memberAccess4.php.expected.json b/validation/frameworks/broken/memberAccess4.php.expected.json new file mode 100644 index 0000000..e2352a7 --- /dev/null +++ b/validation/frameworks/broken/memberAccess4.php.expected.json @@ -0,0 +1,69 @@ +{ + "references": { + "MyNamespace\\Request::create()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + ], + "MyNamespace\\Request": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + ], + "MyNamespace\\Url->toString()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + ], + "MyNamespace\\Url": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->testRequest()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "testRequest", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess4.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/memberAccess5.php.expected.json b/validation/frameworks/broken/memberAccess5.php.expected.json new file mode 100644 index 0000000..ec0f722 --- /dev/null +++ b/validation/frameworks/broken/memberAccess5.php.expected.json @@ -0,0 +1,56 @@ +{ + "references": [], + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess5.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\ParseErrorsTest": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "ParseErrorsTest", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess5.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\ParseErrorsTest->setUp()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "setUp", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberAccess5.php" + }, + "containerName": "MyNamespace\\ParseErrorsTest" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/memberCall1.php.expected.json b/validation/frameworks/broken/memberCall1.php.expected.json new file mode 100644 index 0000000..b640d83 --- /dev/null +++ b/validation/frameworks/broken/memberCall1.php.expected.json @@ -0,0 +1,66 @@ +{ + "references": { + "MyNamespace\\AccountInterface": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberCall1.php" + ], + "MyNamespace\\A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberCall1.php" + ], + "MyNamespace\\AccountInterface->getAccount()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberCall1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberCall1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\ParseErrorsTest": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "ParseErrorsTest", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberCall1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\ParseErrorsTest->setAccount()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "setAccount", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/memberCall1.php" + }, + "containerName": "MyNamespace\\ParseErrorsTest" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/multipleNamespaces.php.expected.json b/validation/frameworks/broken/multipleNamespaces.php.expected.json new file mode 100644 index 0000000..95b3645 --- /dev/null +++ b/validation/frameworks/broken/multipleNamespaces.php.expected.json @@ -0,0 +1,116 @@ +{ + "references": { + "MyNamespace2\\MyNamespace1\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + ], + "MyNamespace2\\A->b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + ] + }, + "definitions": { + "MyNamespace1": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace1", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace1\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + }, + "containerName": "MyNamespace1" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace1\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + }, + "containerName": "MyNamespace1\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace2": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace2", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace2\\A": { + "extends": [ + "MyNamespace2\\MyNamespace1\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + }, + "containerName": "MyNamespace2" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace2\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multipleNamespaces.php" + }, + "containerName": "MyNamespace2\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/multiplePreceedingComments.php b/validation/frameworks/broken/multiplePreceedingComments.php new file mode 100644 index 0000000..1490385 --- /dev/null +++ b/validation/frameworks/broken/multiplePreceedingComments.php @@ -0,0 +1,15 @@ +fn()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "fn", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/multiplePreceedingComments.php" + }, + "containerName": "Foo" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/nameToken.php.expected.json b/validation/frameworks/broken/nameToken.php.expected.json new file mode 100644 index 0000000..12bb667 --- /dev/null +++ b/validation/frameworks/broken/nameToken.php.expected.json @@ -0,0 +1,43 @@ +{ + "references": { + "static": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/nameToken.php" + ] + }, + "definitions": { + "A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/nameToken.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "A->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/nameToken.php" + }, + "containerName": "A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces2.php.expected.json b/validation/frameworks/broken/namespaces2.php.expected.json new file mode 100644 index 0000000..a309950 --- /dev/null +++ b/validation/frameworks/broken/namespaces2.php.expected.json @@ -0,0 +1,35 @@ +{ + "references": { + "NS1\\C": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces2.php" + ], + "NS1": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces2.php" + ], + "NS1\\I": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces2.php" + ], + "NS1\\T": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces2.php" + ] + }, + "definitions": { + "MyNamespace1": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace1", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces3.php.expected.json b/validation/frameworks/broken/namespaces3.php.expected.json new file mode 100644 index 0000000..d347fa2 --- /dev/null +++ b/validation/frameworks/broken/namespaces3.php.expected.json @@ -0,0 +1,14 @@ +{ + "references": { + "a\\b": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces3.php" + ], + "b": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces3.php" + ], + "c": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces3.php" + ] + }, + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces4.php.expected.json b/validation/frameworks/broken/namespaces4.php.expected.json new file mode 100644 index 0000000..32f01cb --- /dev/null +++ b/validation/frameworks/broken/namespaces4.php.expected.json @@ -0,0 +1,11 @@ +{ + "references": { + "a\\b": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces4.php" + ], + "a": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces4.php" + ] + }, + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces5.php.expected.json b/validation/frameworks/broken/namespaces5.php.expected.json new file mode 100644 index 0000000..95e8f51 --- /dev/null +++ b/validation/frameworks/broken/namespaces5.php.expected.json @@ -0,0 +1,44 @@ +{ + "references": { + "LanguageServer\\Protocol": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ], + "LanguageServer": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ], + "LanguageServer\\Protocol\\TextDocumentIdentifier": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ], + "LanguageServer\\Protocol\\Position": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ], + "LanguageServer\\Protocol\\ReferenceContext": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ], + "LanguageServer\\Protocol\\Location": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ], + "LanguageServer\\Protocol\\Range": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + ] + }, + "definitions": { + "B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "B", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces5.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces6.php.expected.json b/validation/frameworks/broken/namespaces6.php.expected.json new file mode 100644 index 0000000..ff214a7 --- /dev/null +++ b/validation/frameworks/broken/namespaces6.php.expected.json @@ -0,0 +1,22 @@ +{ + "references": [], + "definitions": { + "A\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "A\\B", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces6.php" + }, + "containerName": "A" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces7.php.expected.json b/validation/frameworks/broken/namespaces7.php.expected.json new file mode 100644 index 0000000..fe7e4fc --- /dev/null +++ b/validation/frameworks/broken/namespaces7.php.expected.json @@ -0,0 +1,4 @@ +{ + "references": [], + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces8.php.expected.json b/validation/frameworks/broken/namespaces8.php.expected.json new file mode 100644 index 0000000..3538793 --- /dev/null +++ b/validation/frameworks/broken/namespaces8.php.expected.json @@ -0,0 +1,26 @@ +{ + "references": { + "LanguageServer": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces8.php" + ] + }, + "definitions": { + "LanguageServer\\Tests\\Utils": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "LanguageServer\\Tests\\Utils", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/namespaces8.php" + }, + "containerName": "LanguageServer\\Tests" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/namespaces9.php.expected.json b/validation/frameworks/broken/namespaces9.php.expected.json new file mode 100644 index 0000000..fe7e4fc --- /dev/null +++ b/validation/frameworks/broken/namespaces9.php.expected.json @@ -0,0 +1,4 @@ +{ + "references": [], + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/objectCreation.php.expected.json b/validation/frameworks/broken/objectCreation.php.expected.json new file mode 100644 index 0000000..a23931a --- /dev/null +++ b/validation/frameworks/broken/objectCreation.php.expected.json @@ -0,0 +1,60 @@ +{ + "references": { + "MyNamespace\\A->inline_diff_renderer": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/objectCreation2.php.expected.json b/validation/frameworks/broken/objectCreation2.php.expected.json new file mode 100644 index 0000000..c2226fb --- /dev/null +++ b/validation/frameworks/broken/objectCreation2.php.expected.json @@ -0,0 +1,80 @@ +{ + "references": { + "MyNamespace\\B->hi()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation2.php" + ], + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation2.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/objectCreation3.php.expected.json b/validation/frameworks/broken/objectCreation3.php.expected.json new file mode 100644 index 0000000..9c2d753 --- /dev/null +++ b/validation/frameworks/broken/objectCreation3.php.expected.json @@ -0,0 +1,43 @@ +{ + "references": { + "A->args": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation3.php" + ] + }, + "definitions": { + "A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/objectCreation3.php" + }, + "containerName": "A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/param1.php.expected.json b/validation/frameworks/broken/param1.php.expected.json new file mode 100644 index 0000000..0d4fb71 --- /dev/null +++ b/validation/frameworks/broken/param1.php.expected.json @@ -0,0 +1,43 @@ +{ + "references": { + "MyNamespace\\Hi": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/param1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/param1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\init()": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "init", + "kind": 12, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/param1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/parameterTypeResolution1.php b/validation/frameworks/broken/parameterTypeResolution1.php index 09ead6f..d69bc7e 100644 --- a/validation/frameworks/broken/parameterTypeResolution1.php +++ b/validation/frameworks/broken/parameterTypeResolution1.php @@ -1,7 +1,7 @@ getAccount()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parameterTypeResolution1.php" + ] + }, + "definitions": { + "ParamType": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "ParamType", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parameterTypeResolution1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "ParamType->setAccount()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "setAccount", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parameterTypeResolution1.php" + }, + "containerName": "ParamType" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "ParamType->getAccount()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "getAccount", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parameterTypeResolution1.php" + }, + "containerName": "ParamType" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/parent1.php.expected.json b/validation/frameworks/broken/parent1.php.expected.json new file mode 100644 index 0000000..0bd3113 --- /dev/null +++ b/validation/frameworks/broken/parent1.php.expected.json @@ -0,0 +1,99 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + ], + "parent": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent1.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/parent2.php.expected.json b/validation/frameworks/broken/parent2.php.expected.json new file mode 100644 index 0000000..bedd4d5 --- /dev/null +++ b/validation/frameworks/broken/parent2.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + ], + "PARENT::b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + ], + "PARENT": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent2.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/parent3.php.expected.json b/validation/frameworks/broken/parent3.php.expected.json new file mode 100644 index 0000000..b051fb9 --- /dev/null +++ b/validation/frameworks/broken/parent3.php.expected.json @@ -0,0 +1,108 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + ], + "MyNamespace\\parent": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + ], + "parent": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + ], + "MyNamespace\\b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + ], + "b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/parent3.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/propertyName1.php.expected.json b/validation/frameworks/broken/propertyName1.php.expected.json new file mode 100644 index 0000000..24b16fe --- /dev/null +++ b/validation/frameworks/broken/propertyName1.php.expected.json @@ -0,0 +1,39 @@ +{ + "references": [], + "definitions": { + "MyClass": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "MyClass", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/propertyName1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyClass->mainPropertyName": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "mainPropertyName", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/propertyName1.php" + }, + "containerName": "MyClass" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\String_", + "type": {}, + "documentation": "The name of the main property, or NULL if there is none." + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/propertyName2.php.expected.json b/validation/frameworks/broken/propertyName2.php.expected.json new file mode 100644 index 0000000..59db6fc --- /dev/null +++ b/validation/frameworks/broken/propertyName2.php.expected.json @@ -0,0 +1,39 @@ +{ + "references": [], + "definitions": { + "MyClass": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "MyClass", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/propertyName2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyClass->mainPropertyName": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "mainPropertyName", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/propertyName2.php" + }, + "containerName": "MyClass" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\String_", + "type": {}, + "documentation": "The name of the main property, or NULL if there is none." + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/returnType.php.expected.json b/validation/frameworks/broken/returnType.php.expected.json new file mode 100644 index 0000000..45831dc --- /dev/null +++ b/validation/frameworks/broken/returnType.php.expected.json @@ -0,0 +1,46 @@ +{ + "references": { + "TestNamespace\\TestClass": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/returnType.php" + ], + "TestNamespace\\TestClass2": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/returnType.php" + ] + }, + "definitions": { + "TestNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "TestNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/returnType.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "TestNamespace\\whatever()": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "whatever", + "kind": 12, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/returnType.php" + }, + "containerName": "TestNamespace" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Object_", + "type": {}, + "documentation": "Aute duis elit reprehenderit tempor cillum proident anim laborum eu laboris reprehenderit ea incididunt." + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/scopedPropertyAccess.php.expected.json b/validation/frameworks/broken/scopedPropertyAccess.php.expected.json new file mode 100644 index 0000000..f30d235 --- /dev/null +++ b/validation/frameworks/broken/scopedPropertyAccess.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "MyNamespace\\A::a()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess.php" + ], + "MyNamespace\\A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::a()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/scopedPropertyAccess2.php.expected.json b/validation/frameworks/broken/scopedPropertyAccess2.php.expected.json new file mode 100644 index 0000000..93d41ae --- /dev/null +++ b/validation/frameworks/broken/scopedPropertyAccess2.php.expected.json @@ -0,0 +1,26 @@ +{ + "references": { + "MyNamespace\\A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/scopedPropertyAccess3.php.expected.json b/validation/frameworks/broken/scopedPropertyAccess3.php.expected.json new file mode 100644 index 0000000..7017098 --- /dev/null +++ b/validation/frameworks/broken/scopedPropertyAccess3.php.expected.json @@ -0,0 +1,46 @@ +{ + "references": { + "A::$a": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess3.php" + ], + "A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess3.php" + ] + }, + "definitions": { + "A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "A::$a": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess3.php" + }, + "containerName": "A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\String_", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/scopedPropertyAccess4.php.expected.json b/validation/frameworks/broken/scopedPropertyAccess4.php.expected.json new file mode 100644 index 0000000..015a08c --- /dev/null +++ b/validation/frameworks/broken/scopedPropertyAccess4.php.expected.json @@ -0,0 +1,8 @@ +{ + "references": { + "A": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess4.php" + ] + }, + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/scopedPropertyAccess5.php.expected.json b/validation/frameworks/broken/scopedPropertyAccess5.php.expected.json new file mode 100644 index 0000000..a556e1a --- /dev/null +++ b/validation/frameworks/broken/scopedPropertyAccess5.php.expected.json @@ -0,0 +1,52 @@ +{ + "references": { + "TestInterface": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess5.php" + ], + "TestClass::$testProperty": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess5.php" + ], + "TestClass": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess5.php" + ], + "TestClass::$staticTestProperty": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess5.php" + ] + }, + "definitions": { + "TestClass": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "TestClass", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess5.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "TestClass::$testProperty": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "testProperty", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/scopedPropertyAccess5.php" + }, + "containerName": "TestClass" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Array_", + "type": {}, + "documentation": "Lorem excepteur officia sit anim velit veniam enim." + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/self1.php b/validation/frameworks/broken/self1.php index b3036d2..e286381 100644 --- a/validation/frameworks/broken/self1.php +++ b/validation/frameworks/broken/self1.php @@ -10,6 +10,7 @@ class B { class A extends B { function a () { + // TODO - should 'self' be included in references? $a = self::b(); } } diff --git a/validation/frameworks/broken/self1.php.expected.json b/validation/frameworks/broken/self1.php.expected.json new file mode 100644 index 0000000..d1953fb --- /dev/null +++ b/validation/frameworks/broken/self1.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + ], + "MyNamespace\\A::b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + ], + "self": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self1.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/self2.php.expected.json b/validation/frameworks/broken/self2.php.expected.json new file mode 100644 index 0000000..71204d8 --- /dev/null +++ b/validation/frameworks/broken/self2.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + ], + "SELF::b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + ], + "SELF": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self2.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/self3.php.expected.json b/validation/frameworks/broken/self3.php.expected.json new file mode 100644 index 0000000..0bf7e6c --- /dev/null +++ b/validation/frameworks/broken/self3.php.expected.json @@ -0,0 +1,108 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + ], + "MyNamespace\\self": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + ], + "self": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + ], + "MyNamespace\\b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + ], + "b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self3.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/self4.php.expected.json b/validation/frameworks/broken/self4.php.expected.json new file mode 100644 index 0000000..e9665ba --- /dev/null +++ b/validation/frameworks/broken/self4.php.expected.json @@ -0,0 +1,69 @@ +{ + "references": { + "self": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + ], + "MyNamespace\\A->addTestFile()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + ], + "MyNamespace\\DS": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + ], + "DS": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A::suite()": { + "extends": [], + "isGlobal": false, + "isStatic": true, + "canBeInstantiated": false, + "symbolInformation": { + "name": "suite", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self4.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/self5.php.expected.json b/validation/frameworks/broken/self5.php.expected.json new file mode 100644 index 0000000..5758d93 --- /dev/null +++ b/validation/frameworks/broken/self5.php.expected.json @@ -0,0 +1,60 @@ +{ + "references": { + "MyNamespace\\A->assertTrue()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self5.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self5.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self5.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->typesProvider()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "typesProvider", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/self5.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/static1.php.expected.json b/validation/frameworks/broken/static1.php.expected.json new file mode 100644 index 0000000..66591b2 --- /dev/null +++ b/validation/frameworks/broken/static1.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + ], + "MyNamespace\\A::b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + ], + "static": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static1.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/static2.php.expected.json b/validation/frameworks/broken/static2.php.expected.json new file mode 100644 index 0000000..dec1323 --- /dev/null +++ b/validation/frameworks/broken/static2.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + ], + "STATIC::b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + ], + "STATIC": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static2.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/static3.php.expected.json b/validation/frameworks/broken/static3.php.expected.json new file mode 100644 index 0000000..3a82172 --- /dev/null +++ b/validation/frameworks/broken/static3.php.expected.json @@ -0,0 +1,102 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + ], + "MyNamespace\\b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + ], + "b()": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\B->b()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "b", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + }, + "containerName": "MyNamespace\\B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static3.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/static4.php.expected.json b/validation/frameworks/broken/static4.php.expected.json new file mode 100644 index 0000000..cab56e3 --- /dev/null +++ b/validation/frameworks/broken/static4.php.expected.json @@ -0,0 +1,65 @@ +{ + "references": { + "MyNamespace\\B": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static4.php" + ], + "static": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static4.php" + ] + }, + "definitions": { + "MyNamespace": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "MyNamespace", + "kind": 3, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static4.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A": { + "extends": [ + "MyNamespace\\B" + ], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "A", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static4.php" + }, + "containerName": "MyNamespace" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "MyNamespace\\A->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/static4.php" + }, + "containerName": "MyNamespace\\A" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/staticInArray.php.expected.json b/validation/frameworks/broken/staticInArray.php.expected.json new file mode 100644 index 0000000..fe7e4fc --- /dev/null +++ b/validation/frameworks/broken/staticInArray.php.expected.json @@ -0,0 +1,4 @@ +{ + "references": [], + "definitions": [] +} \ No newline at end of file diff --git a/validation/frameworks/broken/stringVariable.php.expected.json b/validation/frameworks/broken/stringVariable.php.expected.json new file mode 100644 index 0000000..ce53869 --- /dev/null +++ b/validation/frameworks/broken/stringVariable.php.expected.json @@ -0,0 +1,60 @@ +{ + "references": { + "B->hi": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/stringVariable.php" + ] + }, + "definitions": { + "B": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "B", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/stringVariable.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "B->hi": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "hi", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/stringVariable.php" + }, + "containerName": "B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Integer", + "type": {}, + "documentation": null + }, + "B->a()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "a", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/stringVariable.php" + }, + "containerName": "B" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file diff --git a/validation/frameworks/broken/testQualifiedNameOutsideOfNamespace.php b/validation/frameworks/broken/testQualifiedNameOutsideOfNamespace.php new file mode 100644 index 0000000..61fe57e --- /dev/null +++ b/validation/frameworks/broken/testQualifiedNameOutsideOfNamespace.php @@ -0,0 +1,5 @@ +bar = 'hello'; + } +} diff --git a/validation/frameworks/broken/verifyFqsenOnClassProperty.php.expected.json b/validation/frameworks/broken/verifyFqsenOnClassProperty.php.expected.json new file mode 100644 index 0000000..73a81e9 --- /dev/null +++ b/validation/frameworks/broken/verifyFqsenOnClassProperty.php.expected.json @@ -0,0 +1,63 @@ +{ + "references": { + "CURLAUTH_BASIC": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/verifyFqsenOnClassProperty.php" + ], + "Foo->bar": [ + "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/verifyFqsenOnClassProperty.php" + ] + }, + "definitions": { + "Foo": { + "extends": [], + "isGlobal": true, + "isStatic": false, + "canBeInstantiated": true, + "symbolInformation": { + "name": "Foo", + "kind": 5, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/verifyFqsenOnClassProperty.php" + }, + "containerName": "" + }, + "type__class": "LanguageServer\\Tests\\ValidationTest", + "type": null, + "documentation": null + }, + "Foo->bar": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "bar", + "kind": 7, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/verifyFqsenOnClassProperty.php" + }, + "containerName": "Foo" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + }, + "Foo->foo()": { + "extends": [], + "isGlobal": false, + "isStatic": false, + "canBeInstantiated": false, + "symbolInformation": { + "name": "foo", + "kind": 6, + "location": { + "uri": "\/Users\/roblou\/code\/php-language-server\/tests\/Validation\/..\/..\/validation\/frameworks\/broken\/verifyFqsenOnClassProperty.php" + }, + "containerName": "Foo" + }, + "type__class": "phpDocumentor\\Reflection\\Types\\Mixed", + "type": {}, + "documentation": null + } + } +} \ No newline at end of file