original_string: public function getPointsSinceDay(Metric $metric, $day)
      {
          $queryType = $this->getQueryType($metric);
          $points = DB::select("SELECT DATE_FORMAT({$this->getMetricPointsTable()}.`created_at`, '%Y-%m-%d') AS `key`, {$queryType} ".
              "FROM {$this->getMetricsTable()} INNER JOIN {$this->getMetricPointsTable()} ON {$this->getMetricsTable()}.id = {$this->getMetricPointsTable()}.metric_id ".
              "WHERE {$this->getMetricsTable()}.id = :metricId ".
              "AND {$this->getMetricPointsTable()}.`created_at` >= DATE_SUB(NOW(), INTERVAL :day DAY) ".
              "AND {$this->getMetricPointsTable()}.`created_at` <= NOW() ".
              "GROUP BY DATE({$this->getMetricPointsTable()}.`created_at`) ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
              'metricId' => $metric->id,
              'day'      => $day,
          ]);
  
          return $this->mapResults($metric, $points);
      }
code: public function getPointsSinceDay(Metric $metric, $day)
      {
          $queryType = $this->getQueryType($metric);
          $points = DB::select("SELECT DATE_FORMAT({$this->getMetricPointsTable()}.`created_at`, '%Y-%m-%d') AS `key`, {$queryType} ".
              "FROM {$this->getMetricsTable()} INNER JOIN {$this->getMetricPointsTable()} ON {$this->getMetricsTable()}.id = {$this->getMetricPointsTable()}.metric_id ".
              "WHERE {$this->getMetricsTable()}.id = :metricId ".
              "AND {$this->getMetricPointsTable()}.`created_at` >= DATE_SUB(NOW(), INTERVAL :day DAY) ".
              "AND {$this->getMetricPointsTable()}.`created_at` <= NOW() ".
              "GROUP BY DATE({$this->getMetricPointsTable()}.`created_at`) ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
              'metricId' => $metric->id,
              'day'      => $day,
          ]);
  
          return $this->mapResults($metric, $points);
      }
code_tokens: public function getPointsSinceDay ( Metric $ metric , $ day ) { $ queryType = $ this -> getQueryType ( $ metric ) ; $ points = DB :: select ( "SELECT DATE_FORMAT({$this->getMetricPointsTable()}.`created_at`, '%Y-%m-%d') AS `key`, {$queryType} " . "FROM {$this->getMetricsTable()} INNER JOIN {$this->getMetricPointsTable()} ON {$this->getMetricsTable()}.id = {$this->getMetricPointsTable()}.metric_id " . "WHERE {$this->getMetricsTable()}.id = :metricId " . "AND {$this->getMetricPointsTable()}.`created_at` >= DATE_SUB(NOW(), INTERVAL :day DAY) " . "AND {$this->getMetricPointsTable()}.`created_at` <= NOW() " . "GROUP BY DATE({$this->getMetricPointsTable()}.`created_at`) ORDER BY {$this->getMetricPointsTable()}.`created_at`" , [ 'metricId' => $ metric -> id , 'day' => $ day , ] ) ; return $ this -> mapResults ( $ metric , $ points ) ; }
docstring: Returns metrics since given day.
  
  @param \CachetHQ\Cachet\Models\Metric $metric
  @param int                            $day
  
  @return \Illuminate\Support\Collection
docstring_tokens: Returns metrics since given day .