Skip to content

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

Merged
TomasVotruba merged 3 commits intomainfrom
skip-if-use-param-doc
Feb 22, 2023
Merged

[DeadCode] Skip if cond use variable from @param doc on RemoveAlwaysTrueIfConditionRector#3402
TomasVotruba merged 3 commits intomainfrom
skip-if-use-param-doc

Conversation

@samsonasik
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Fixed 🎉

@samsonasik
Copy link
Copy Markdown
Member Author

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

@TomasVotruba
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

3 participants