Skip to content

Commit

Permalink
Fix syntax issue in PHP 7.2
Browse files Browse the repository at this point in the history
Fixes #5206
  • Loading branch information
muglug committed Feb 12, 2021
1 parent 257a1ca commit c9ff1ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Psalm/Codebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ public function getCompletionItemsForType(Type\Union $type): array
null,
null,
null,
$property_name,
$property_name
);
}
} elseif ($atomic_type instanceof Type\Atomic\TLiteralString) {
Expand All @@ -1642,7 +1642,7 @@ public function getCompletionItemsForType(Type\Union $type): array
null,
null,
null,
"'$atomic_type->value'",
"'$atomic_type->value'"
);
} elseif ($atomic_type instanceof Type\Atomic\TLiteralInt) {
$completion_items[] = new \LanguageServerProtocol\CompletionItem(
Expand All @@ -1652,7 +1652,7 @@ public function getCompletionItemsForType(Type\Union $type): array
null,
null,
null,
(string) $atomic_type->value,
(string) $atomic_type->value
);
} elseif ($atomic_type instanceof Type\Atomic\TScalarClassConstant) {
$const = $atomic_type->fq_classlike_name . '::' . $atomic_type->const_name;
Expand All @@ -1663,7 +1663,7 @@ public function getCompletionItemsForType(Type\Union $type): array
null,
null,
null,
$const,
$const
);
}
}
Expand Down

1 comment on commit c9ff1ee

@weirdan
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's one more on line 1691 (also fixed in #5201)

Please sign in to comment.