Skip to content

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants