Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EarlyReturn] Skip ReturnEarlyIfVariableRector with @var doc #2616

Merged
merged 4 commits into from
Jul 3, 2022

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Jul 3, 2022

The following code should be skipped:

final class SkipWithVarDoc
{
    public function run(int $value): int|string
    {
        if ($value === 50) {
            /** @var string $value */
            $value = execute();
        }

        return $value;
    }
}

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba
Copy link
Member

👍

@TomasVotruba TomasVotruba merged commit 25accb2 into main Jul 3, 2022
@TomasVotruba TomasVotruba deleted the skip-with-var-doc branch July 3, 2022 11:16
@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
2 participants