Skip to content

declare @param-out in stubs #9897

@staabm

Description

@staabm

Description

since phpstan 1.9 support for @param-out phpdoc was added. psalm supports it for a longer time.

it would be great if the php-src stub files could annotate the sources with @param-out when the types a parameter manipulated by referenced are known. that way the tools could consume the types, without the need to maintain such list in all tools redundantly.

one example is e.g.

php-src/ext/curl/curl.stub.php

Lines 3598 to 3603 in 02ed122

/**
* @param int $queued_messages
* @return array<string, int|object>|false
* @refcount 1
*/
function curl_multi_info_read(CurlMultiHandle $multi_handle, &$queued_messages = null): array|false {}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions