original_string: 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;
          });
      }
code: 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;
          });
      }
code_tokens: 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 ; } ) ; }
docstring: Map the result set.
  
  @param \CachetHQ\Cachet\Models\Metric $metric
  @param array                          $results
  
  @return \Illuminate\Support\Collection
docstring_tokens: Map the result set .