DowngradeRoundingModeEnumRector
Replace RoundingMode enum to rounding mode constant in round()
-round(1.5, 0, RoundingMode::HalfAwayFromZero);
+round(1.5, 0, PHP_ROUND_HALF_UP);
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp84\Rector\FuncCall\DowngradeRoundingModeEnumRector;
return RectorConfig::configure()
->withRules([
DowngradeRoundingModeEnumRector::class,
]);