Bug report
Just updated to 2.2.0 and ran PHPStan again, which wanted to change:
$leaveOver = (int) round($totalCount / 2, 0, \RoundingMode::HalfTowardsZero);
to
$leaveOver = (int) round($totalCount / 2, 0, PHP_ROUND_HALF_DOWN);
The former being the modern way: https://www.php.net/manual/en/function.round.php
Rector wants to change this back again to the enum btw. Which I think is the right choice here.
Code snippet that reproduces the problem
https://phpstan.org/r/4d705edc-f164-4474-9ff4-661aa4c7da69
Expected output
See above
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
Just updated to 2.2.0 and ran PHPStan again, which wanted to change:
$leaveOver = (int) round($totalCount / 2, 0, \RoundingMode::HalfTowardsZero);to
$leaveOver = (int) round($totalCount / 2, 0, PHP_ROUND_HALF_DOWN);The former being the modern way: https://www.php.net/manual/en/function.round.php
Rector wants to change this back again to the enum btw. Which I think is the right choice here.
Code snippet that reproduces the problem
https://phpstan.org/r/4d705edc-f164-4474-9ff4-661aa4c7da69
Expected output
See above
Did PHPStan help you today? Did it make you happy in any way?
No response