Skip to content

Conversation

@samsonasik
Copy link
Member

When on PHP 8.1 env, the following code:

final class SkipIntersectionArray
{
    public function setAuthorizationHeader(array $config): array
    {
        if (!isset($config['headers'])) {
            $config['headers'] = [];
        }

        return $config;
    }
}

produce multiple array&array type https://getrector.org/demo/aa69f911-2a43-417e-95a9-83c44178a957

This PR fix it.

Fixes rectorphp/rector#7488

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @Aerendir @thomasschiet

@TomasVotruba TomasVotruba enabled auto-merge (squash) September 22, 2022 17:18
@TomasVotruba
Copy link
Member

Thanks 👍

@TomasVotruba TomasVotruba merged commit 3335ea4 into main Sep 22, 2022
@TomasVotruba TomasVotruba deleted the skip-intersection-array branch September 22, 2022 17:24
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.

Rector adds the same return type hint three times (array&array&array)

3 participants