Add failing test fixture for NullToStrictStringFuncCallArgRector
Failing Test for NullToStrictStringFuncCallArgRector
Based on https://getrector.org/demo/9a90408b-44b7-48f9-a5fa-458a526e8749
Code should be untouched: trim can't get a null value. If method is used without trait, it works fine.
That's expected, property is defined in class, while trait access it, it will be marked as mixed, as trait here is depends on class.
Once the trait is consumed by class that not has the property, it will be undefined https://3v4l.org/Yt7Bq .
Even property defined in trait, accessing property from property fetch under trait seems not possible, at least for now.
Thanks for your reply. I experienced this problem after PHPStan notifying me that there is a useless type cast. So there should be a way to detect that $title is a ?string
These 2 files should be separated. One in Fixture and another in Source.