protected function mapResults(Metric $metric, array $results)
    {
        $results = Collection::make($results);

        return $results->map(function ($point) use ($metric) {
            if (!$point->value) {
                $point->value = $metric->default_value;
            }

            if ($point->value === 0 && $metric->default_value != $point->value) {
                $point->value = $metric->default_value;
            }

            $point->value = round($point->value, $metric->places);

            return $point;
        });
    }
protected function mapResults(Metric $metric, array $results)
    {
        $results = Collection::make($results);

        return $results->map(function ($point) use ($metric) {
            if (!$point->value) {
                $point->value = $metric->default_value;
            }

            if ($point->value === 0 && $metric->default_value != $point->value) {
                $point->value = $metric->default_value;
            }

            $point->value = round($point->value, $metric->places);

            return $point;
        });
    }
protected function mapResults ( Metric $ metric , array $ results ) { $ results = Collection :: make ( $ results ) ; return $ results -> map ( function ( $ point ) use ( $ metric ) { if ( ! $ point -> value ) { $ point -> value = $ metric -> default_value ; } if ( $ point -> value === 0 && $ metric -> default_value != $ point -> value ) { $ point -> value = $ metric -> default_value ; } $ point -> value = round ( $ point -> value , $ metric -> places ) ; return $ point ; } ) ; }
Map the result set.

@param \CachetHQ\Cachet\Models\Metric $metric
@param array                          $results

@return \Illuminate\Support\Collection
Map the result set .