MyCLabsConstructorCallToEnumFromRector

Refactor MyCLabs Enum using constructor for instantiation

-$enum = new Enum($args);
+$enum = Enum::from($args);

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php81\Rector\New_\MyCLabsConstructorCallToEnumFromRector;

return RectorConfig::configure()
    ->withRules([
        MyCLabsConstructorCallToEnumFromRector::class,
    ]);
SETS:  PHP 8.1