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

[DeadCode] Skip if cond use variable from @param doc on RemoveAlwaysTrueIfConditionRector #3402

Merged
merged 3 commits into from
Feb 22, 2023

Conversation

samsonasik
Copy link
Member

The following code should be skipped:

class SkipByParamDoc
{
    /**
     * @param \DateTime $param
     */
    public function verify($param)
    {
        if ($param instanceof \DateTime) {
            return true;
        }

        return false;
    }
}

as it rely on @param doc.

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@TomasVotruba
Copy link
Member

Thank you 👏

@TomasVotruba TomasVotruba merged commit b1b48bc into main Feb 22, 2023
@TomasVotruba TomasVotruba deleted the skip-if-use-param-doc branch February 22, 2023 18:44
samsonasik added a commit that referenced this pull request May 8, 2023
…rueIfConditionRector (#3402)

Co-authored-by: GitHub Action <action@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants