Feature Request
With php 8 nullsafe operator was introduced more info: https://stitcher.io/blog/php-8-nullsafe-operator
I would like a rule that cleans up nullsafe checks on returns that dont return null
Diff
class HelloWorld {
public function getString(): string
{
return 'hello world';
}
}
public function get(): HelloWorld
{
return new HelloWorld();
}
-echo $this->get()?->getHelloWorld();
+echo $this->get()->getHelloWorld();