DowngradeNewMethodCallWithoutParenthesesRector
Add parentheses on new method call without parentheses
-new Request()->withMethod('GET')->withUri('/hello-world');
+(new Request())->withMethod('GET')->withUri('/hello-world');
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp84\Rector\MethodCall\DowngradeNewMethodCallWithoutParenthesesRector;
return RectorConfig::configure()
->withRules([
DowngradeNewMethodCallWithoutParenthesesRector::class,
]);