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

[Php81] Allow explicit mixed processed on trait on NullToStrictStringFuncCallArgRector #3212

Merged
merged 4 commits into from Dec 17, 2022

Conversation

samsonasik
Copy link
Member

Explit mixed in trait:

trait ExplicitMixedInTrait
{
    public function setTitle(mixed $title)
    {
        $this->title = $title;
        return trim($this->title);
    }
}

should be allowed to be processed on NullToStrictStringFuncCallArgRector to be:

-return trim($this->title);
+return trim((string) $this->title);

@samsonasik
Copy link
Member Author

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

@samsonasik
Copy link
Member Author

I am merging it ;)

@samsonasik samsonasik merged commit e35497e into main Dec 17, 2022
@samsonasik samsonasik deleted the allow-explicit-mixed branch December 17, 2022 14:44
@TomasVotruba
Copy link
Member

Good job :)

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