Skip to content

Docblock generator does not use short name for Promise in Generator #1953

@dantleech

Description

@dantleech
    /**
     * @return Generator<Promise<Phpactor\LanguageServer\Core\Rpc\ResponseMessage|null>>
     */
    public function testReturnsNullIfMessageIsANotification(): Generator
    {
            $dispatcher = $this->createRunner([
                new ClosureHandler('foobar', function (): void {
                })
            ]);

            $response = yield $dispatcher->dispatch(
                new NotificationMessage('foobar', [])
            );

            self::assertNull($response);
    }

ResponseMessage should be the short name --- this could be inconsistent, it seems to work on some of the methods in this class (tests/Unit/Core/Handler/HandlerMethodRunnerTest.php) in language-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions