Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 13, 2020
1 parent 73f8f96 commit 633b210
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,12 @@ public static function getArrayVarId(
$offset = 'static::' . $stmt->dim->name;
} elseif ($stmt->dim
&& $source instanceof StatementsAnalyzer
&& ($stmt_dim_type = $source->node_data->getType($stmt->dim))) {
&& ($stmt_dim_type = $source->node_data->getType($stmt->dim))
&& (!$stmt->dim instanceof PhpParser\Node\Expr\ClassConstFetch
|| !$stmt->dim->name instanceof PhpParser\Node\Identifier
|| $stmt->dim->name->name !== 'class'
)
) {
if ($stmt_dim_type->isSingleStringLiteral()) {
$offset = '\'' . $stmt_dim_type->getSingleStringLiteral()->value . '\'';
} elseif ($stmt_dim_type->isSingleIntLiteral()) {
Expand Down

0 comments on commit 633b210

Please sign in to comment.