DateTimeMethodCallToCarbonRector

Convert new DateTime() with a method call to Carbon::*()

 class SomeClass
 {
     public function run()
     {
-        $date = (new \DateTime('today +20 day'))->format('Y-m-d');
+        $date = \Carbon\Carbon::today()->addDays(20)->format('Y-m-d')
     }
 }

Configure your rector.php:

<?php

use Rector\Carbon\Rector\MethodCall\DateTimeMethodCallToCarbonRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        DateTimeMethodCallToCarbonRector::class,
    ]);