Apply fixes from StyleCI

This commit is contained in:
James Brooks
2020-02-27 09:44:35 +00:00
committed by StyleCI Bot
parent 4435526b0e
commit 5ff2289eeb
22 changed files with 89 additions and 88 deletions

View File

@@ -39,9 +39,9 @@ class MySqlRepository extends AbstractMetricRepository implements MetricInterfac
"AND {$this->getMetricPointsTable()}.`created_at` >= DATE_SUB(NOW(), INTERVAL :minutes MINUTE) ".
"AND {$this->getMetricPointsTable()}.`created_at` <= NOW() ".
"GROUP BY HOUR({$this->getMetricPointsTable()}.`created_at`), MINUTE({$this->getMetricPointsTable()}.`created_at`) ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
'metricId' => $metric->id,
'minutes' => $minutes,
]);
'metricId' => $metric->id,
'minutes' => $minutes,
]);
return $this->mapResults($metric, $points);
}
@@ -64,9 +64,9 @@ class MySqlRepository extends AbstractMetricRepository implements MetricInterfac
"AND {$this->getMetricPointsTable()}.`created_at` <= NOW() ".
"GROUP BY HOUR({$this->getMetricPointsTable()}.`created_at`) ".
"ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
'metricId' => $metric->id,
'hour' => $hour,
]);
'metricId' => $metric->id,
'hour' => $hour,
]);
return $this->mapResults($metric, $points);
}
@@ -88,9 +88,9 @@ class MySqlRepository extends AbstractMetricRepository implements MetricInterfac
"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,
]);
'metricId' => $metric->id,
'day' => $day,
]);
return $this->mapResults($metric, $points);
}

View File

@@ -39,8 +39,8 @@ class PgSqlRepository extends AbstractMetricRepository implements MetricInterfac
"AND {$this->getMetricPointsTable()}.created_at <= NOW() ".
"GROUP BY to_char({$this->getMetricPointsTable()}.created_at, 'HH24:MI') ".
"ORDER BY {$this->getMetricPointsTable()}.created_at", [
'metricId' => $metric->id,
]);
'metricId' => $metric->id,
]);
return $this->mapResults($metric, $points);
}
@@ -63,8 +63,8 @@ class PgSqlRepository extends AbstractMetricRepository implements MetricInterfac
"AND {$this->getMetricPointsTable()}.created_at <= NOW() ".
"GROUP BY to_char({$this->getMetricPointsTable()}.created_at, 'HH24:00') ".
"ORDER BY {$this->getMetricPointsTable()}.created_at", [
'metricId' => $metric->id,
]);
'metricId' => $metric->id,
]);
return $this->mapResults($metric, $points);
}
@@ -87,8 +87,8 @@ class PgSqlRepository extends AbstractMetricRepository implements MetricInterfac
"AND {$this->getMetricPointsTable()}.created_at <= DATE(NOW()) ".
"GROUP BY DATE({$this->getMetricPointsTable()}.created_at) ".
"ORDER BY DATE({$this->getMetricPointsTable()}.created_at)", [
'metricId' => $metric->id,
]);
'metricId' => $metric->id,
]);
return $this->mapResults($metric, $points);
}

View File

@@ -40,8 +40,8 @@ class SqliteRepository extends AbstractMetricRepository implements MetricInterfa
"AND {$this->getMetricPointsTable()}.`created_at` <= datetime('now', 'localtime') ".
"GROUP BY strftime('%H', {$this->getMetricPointsTable()}.`created_at`), strftime('%M', {$this->getMetricPointsTable()}.`created_at`) ".
"ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
'metricId' => $metric->id,
]);
'metricId' => $metric->id,
]);
return $this->mapResults($metric, $points);
}
@@ -63,8 +63,8 @@ class SqliteRepository extends AbstractMetricRepository implements MetricInterfa
"AND {$this->getMetricPointsTable()}.`created_at` >= datetime('now', 'localtime', '-{$hour} hours') ".
"AND {$this->getMetricPointsTable()}.`created_at` <= datetime('now', 'localtime') ".
"GROUP BY strftime('%H', {$this->getMetricPointsTable()}.`created_at`) ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
'metricId' => $metric->id,
]);
'metricId' => $metric->id,
]);
return $this->mapResults($metric, $points);
}
@@ -87,8 +87,8 @@ class SqliteRepository extends AbstractMetricRepository implements MetricInterfa
"AND {$this->getMetricPointsTable()}.`created_at` <= datetime('now', 'localtime') ".
"GROUP BY DATE({$this->getMetricPointsTable()}.`created_at`) ".
"ORDER BY {$this->getMetricPointsTable()}.`created_at`", [
'metricId' => $metric->id,
]);
'metricId' => $metric->id,
]);
return $this->mapResults($metric, $points);
}