Skip to content

[TypeDeclarationDocblocks] Skip all together if one of calls is first class callable#7358

Merged
samsonasik merged 2 commits intomainfrom
skip-all-together
Sep 28, 2025
Merged

[TypeDeclarationDocblocks] Skip all together if one of calls is first class callable#7358
samsonasik merged 2 commits intomainfrom
skip-all-together

Conversation

@samsonasik
Copy link
Member

Given the following code:

    public function go()
    {
        $this->run(['item1', 'item2']);

        $this->run(...)([1, 2]);
    }

    private function run(array $items)
    {
    }

It produce:

+    /**
+     * @param string[] $items
+     */

which invalid, since on first class callable invoked, it pass array of int as well. This should be skipped all together.

Ref #7357 (review)

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @TomasVotruba

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik enabled auto-merge (squash) September 28, 2025 20:11
@samsonasik samsonasik merged commit b8a8366 into main Sep 28, 2025
49 of 50 checks passed
@samsonasik samsonasik deleted the skip-all-together branch September 28, 2025 20:12
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant