Skip to content

Commit

Permalink
Merge pull request #7263 from orklah/revert
Browse files Browse the repository at this point in the history
revert #7054
  • Loading branch information
orklah committed Jan 1, 2022
2 parents 387f266 + de95fbd commit 6f4707a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Expand Up @@ -219,10 +219,6 @@ public static function getArrayVarId(
}
}

if ($stmt instanceof PhpParser\Node\Expr\ConstFetch) {
return implode('\\', $stmt->name->parts);
}

return self::getVarId($stmt, $this_class_name, $source);
}
}
9 changes: 1 addition & 8 deletions src/Psalm/Type/Reconciler.php
Expand Up @@ -5,7 +5,6 @@
use InvalidArgumentException;
use Psalm\CodeLocation;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\Statements\Expression\Fetch\ConstFetchAnalyzer;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Internal\Codebase\TaintFlowGraph;
use Psalm\Internal\Codebase\VariableUseGraph;
Expand Down Expand Up @@ -556,13 +555,7 @@ private static function getValueForKey(
$key_parts = self::breakUpPathIntoParts($key);

if (count($key_parts) === 1) {
if (isset($existing_keys[$key_parts[0]])) {
return clone $existing_keys[$key_parts[0]];
}

if ($type = ConstFetchAnalyzer::getGlobalConstType($codebase, $key_parts[0], $key_parts[0])) {
return $type;
}
return isset($existing_keys[$key_parts[0]]) ? clone $existing_keys[$key_parts[0]] : null;
}

$base_key = array_shift($key_parts);
Expand Down

0 comments on commit 6f4707a

Please sign in to comment.