Skip to content

[TypeDeclarationDocblocks] Skip deep/nested array structure on AddReturnDocblockForCommonObjectDenominatorRector#7251

Merged
samsonasik merged 3 commits intomainfrom
skip-deep
Sep 12, 2025
Merged

[TypeDeclarationDocblocks] Skip deep/nested array structure on AddReturnDocblockForCommonObjectDenominatorRector#7251
samsonasik merged 3 commits intomainfrom
skip-deep

Conversation

@samsonasik
Copy link
Member

Given the following deep array structure:

final class SkipDeepArrayStructure
{
    public function getExtensions(): array
    {
        return [
            [
                new FirstExtension(),
                new SecondExtension()
            ],
        ];
    }
}

It got diff:

+    /**
+     * @return \Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\AddReturnDocblockForCommonObjectDenominatorRector\Source\Contract\ExtensionInterface[]
+     */
     public function getExtensions(): array

which invalid, as the objects is inside deep structure.

This should be skipped.

@samsonasik samsonasik changed the title [TypeDeclarationDocblocks] Skip deep array structure on AddReturnDocblockForCommonObjectDenominatorRector [TypeDeclarationDocblocks] Skip deep/nested array structure on AddReturnDocblockForCommonObjectDenominatorRector Sep 12, 2025
@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 71cde52 into main Sep 12, 2025
49 checks passed
@samsonasik samsonasik deleted the skip-deep branch September 12, 2025 11:28
@TomasVotruba
Copy link
Member

👍

@github-actions
Copy link
Contributor

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 Feb 15, 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.

2 participants