mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
commit
6f4707aa41
@ -219,10 +219,6 @@ class ExpressionIdentifier
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($stmt instanceof PhpParser\Node\Expr\ConstFetch) {
|
|
||||||
return implode('\\', $stmt->name->parts);
|
|
||||||
}
|
|
||||||
|
|
||||||
return self::getVarId($stmt, $this_class_name, $source);
|
return self::getVarId($stmt, $this_class_name, $source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace Psalm\Type;
|
|||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Psalm\CodeLocation;
|
use Psalm\CodeLocation;
|
||||||
use Psalm\Codebase;
|
use Psalm\Codebase;
|
||||||
use Psalm\Internal\Analyzer\Statements\Expression\Fetch\ConstFetchAnalyzer;
|
|
||||||
use Psalm\Internal\Analyzer\StatementsAnalyzer;
|
use Psalm\Internal\Analyzer\StatementsAnalyzer;
|
||||||
use Psalm\Internal\Codebase\TaintFlowGraph;
|
use Psalm\Internal\Codebase\TaintFlowGraph;
|
||||||
use Psalm\Internal\Codebase\VariableUseGraph;
|
use Psalm\Internal\Codebase\VariableUseGraph;
|
||||||
@ -556,13 +555,7 @@ class Reconciler
|
|||||||
$key_parts = self::breakUpPathIntoParts($key);
|
$key_parts = self::breakUpPathIntoParts($key);
|
||||||
|
|
||||||
if (count($key_parts) === 1) {
|
if (count($key_parts) === 1) {
|
||||||
if (isset($existing_keys[$key_parts[0]])) {
|
return isset($existing_keys[$key_parts[0]]) ? clone $existing_keys[$key_parts[0]] : null;
|
||||||
return clone $existing_keys[$key_parts[0]];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($type = ConstFetchAnalyzer::getGlobalConstType($codebase, $key_parts[0], $key_parts[0])) {
|
|
||||||
return $type;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$base_key = array_shift($key_parts);
|
$base_key = array_shift($key_parts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user