Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Apr 29, 2024
1 parent ee675c7 commit 0e4fc37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Psalm/Internal/LanguageServer/LanguageServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ public function initialize(
$this->path_mapper->configureClientRoot($this->getPathPart($rootUri));
}

return call(
/** @var Promise<InitializeResult> $promise */
$promise = call(
/** @return Generator<int, true, mixed, InitializeResult> */
function () use ($workDoneToken) {
$progress = $this->client->makeProgress($workDoneToken ?? uniqid('tkn', true));
Expand Down Expand Up @@ -578,6 +579,8 @@ function () use ($workDoneToken) {
return new InitializeResult($serverCapabilities, $initializeResultServerInfo);
},
);

return $promise;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion stubs/CoreGenericClasses.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Traversable {
*
* @template-implements Traversable<TKey, TValue>
*/
class Generator implements Traversable {
final class Generator implements Traversable {
/**
* @psalm-ignore-nullable-return
* @return ?TValue Can return any type.
Expand Down

0 comments on commit 0e4fc37

Please sign in to comment.