mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Ignore union types for now
This commit is contained in:
parent
d1fbd1fa26
commit
2c08321603
@ -11,7 +11,7 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"nikic/php-parser": "^4.2.3||^4.3",
|
||||
"nikic/php-parser": "^4.3",
|
||||
"openlss/lib-array2xml": "^1.0",
|
||||
"ocramius/package-versions": "^1.2",
|
||||
"composer/xdebug-handler": "^1.1",
|
||||
|
@ -1945,6 +1945,9 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
|
||||
if ($parser_return_type instanceof PhpParser\Node\Identifier) {
|
||||
$return_type_string = $parser_return_type->name . $suffix;
|
||||
} elseif ($parser_return_type instanceof PhpParser\Node\UnionType) {
|
||||
// for now unsupported
|
||||
$return_type_string = 'mixed';
|
||||
} else {
|
||||
$return_type_fq_classlike_name = ClassLikeAnalyzer::getFQCLNFromNameObject(
|
||||
$parser_return_type,
|
||||
@ -2691,6 +2694,9 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
|
||||
$this->codebase->scanner->queueClassLikeForScanning($param_type_string, $this->file_path);
|
||||
$this->file_storage->referenced_classlikes[strtolower($param_type_string)] = $param_type_string;
|
||||
} elseif ($param_typehint instanceof PhpParser\Node\UnionType) {
|
||||
// not yet supported
|
||||
$param_type_string = 'mixed';
|
||||
} else {
|
||||
if ($this->classlike_storages
|
||||
&& strtolower($param_typehint->parts[0]) === 'self'
|
||||
@ -3060,6 +3066,9 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
|
||||
if ($parser_property_type instanceof PhpParser\Node\Identifier) {
|
||||
$property_type_string = $parser_property_type->name . $suffix;
|
||||
} elseif ($parser_property_type instanceof PhpParser\Node\UnionType) {
|
||||
// not yet supported
|
||||
$property_type_string = 'mixed';
|
||||
} else {
|
||||
$property_type_fq_classlike_name = ClassLikeAnalyzer::getFQCLNFromNameObject(
|
||||
$parser_property_type,
|
||||
|
Loading…
Reference in New Issue
Block a user