rectorphp / rector-phpunit

Rector upgrade rules for PHPUnit
http://getrector.com
MIT License
61 stars 46 forks source link

Replace decimal delta value for PHP_FLOAT_EPSILON #263

Closed eerison closed 9 months ago

eerison commented 9 months ago

In php 7.2 was introduced PHP_FLOAT_EPSILON and I could use this as a small representation for decimal delta.

https://github.com/sebastianbergmann/phpunit/pull/4874 https://github.com/sebastianbergmann/phpunit/issues/3159#issuecomment-1022240982.

and I tested with diffident values and it worked as expected.

TomasVotruba commented 9 months ago

This looks great, thanks for investigating :+1: