kahlan\matcher\ToBeCloseTo::_buildDescription PHP Method

_buildDescription() public static method

Build the description of the runned ::match() call.
public static _buildDescription ( mixed $actual, mixed $expected, integer $precision )
$actual mixed The actual value.
$expected mixed The expected value.
$precision integer The precision to use.
    public static function _buildDescription($actual, $expected, $precision)
    {
        $description = "be close to expected relying to a precision of {$precision}.";
        $data['actual'] = $actual;
        $data['expected'] = $expected;
        $data['gap is >='] = pow(10, -$precision) / 2;
        static::$_description = compact('description', 'data');
    }