Skip to content

Commit de95fbd

Browse files
committed
revert #7054
1 parent 6c176bb commit de95fbd

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/Psalm/Internal/Analyzer/Statements/Expression/ExpressionIdentifier.php

-4
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ public static function getArrayVarId(
219219
}
220220
}
221221

222-
if ($stmt instanceof PhpParser\Node\Expr\ConstFetch) {
223-
return implode('\\', $stmt->name->parts);
224-
}
225-
226222
return self::getVarId($stmt, $this_class_name, $source);
227223
}
228224
}

src/Psalm/Type/Reconciler.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use InvalidArgumentException;
66
use Psalm\CodeLocation;
77
use Psalm\Codebase;
8-
use Psalm\Internal\Analyzer\Statements\Expression\Fetch\ConstFetchAnalyzer;
98
use Psalm\Internal\Analyzer\StatementsAnalyzer;
109
use Psalm\Internal\Codebase\TaintFlowGraph;
1110
use Psalm\Internal\Codebase\VariableUseGraph;
@@ -556,13 +555,7 @@ private static function getValueForKey(
556555
$key_parts = self::breakUpPathIntoParts($key);
557556

558557
if (count($key_parts) === 1) {
559-
if (isset($existing_keys[$key_parts[0]])) {
560-
return clone $existing_keys[$key_parts[0]];
561-
}
562-
563-
if ($type = ConstFetchAnalyzer::getGlobalConstType($codebase, $key_parts[0], $key_parts[0])) {
564-
return $type;
565-
}
558+
return isset($existing_keys[$key_parts[0]]) ? clone $existing_keys[$key_parts[0]] : null;
566559
}
567560

568561
$base_key = array_shift($key_parts);

0 commit comments

Comments
 (0)