Skip to content

[TypeDeclarationDocblocks] Use int key on inner array over mixed key on DocblockVarArrayFromPropertyDefaultsRector#7374

Merged
samsonasik merged 3 commits intomainfrom
use-int-key
Sep 30, 2025
Merged

[TypeDeclarationDocblocks] Use int key on inner array over mixed key on DocblockVarArrayFromPropertyDefaultsRector#7374
samsonasik merged 3 commits intomainfrom
use-int-key

Conversation

@samsonasik
Copy link
Member

Given the following code:

    private array $array = [
        'a' => [
            'b' => [
                ['c' => 'e', 'f' => 1],
                ['d' => 2],
            ],
        ],
    ];

It got diff:

+    /**
+     * @var array<string, array<string, array<mixed, array<string, string|int>>>>
+     */

mixed key should be int.

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @TomasVotruba

@samsonasik
Copy link
Member Author

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

@samsonasik samsonasik merged commit c5e7624 into main Sep 30, 2025
50 checks passed
@samsonasik samsonasik deleted the use-int-key branch September 30, 2025 02:38
@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