<?php
declare(strict_types=1);

namespace FiloBlu\Refilo\Model;

/**
 * Rounds num towards the nearest even value when it is half way there, making both 1.5 and 2.5 into 2.
 */
class RoundHalfEvenStrategy implements RoundingStrategyInterface {

    /**
     * @param $value
     * @param $decimals
     * @return float
     */
    public function round($value, $decimals)
    {
        return round($value, $decimals,PHP_ROUND_HALF_EVEN);
    }
}