From d5c4561fd19b68f79fbce0604ed9b48f24a5c759 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 15 Jun 2015 13:37:21 +0100 Subject: [PATCH] Tidy up metric code --- app/Models/Metric.php | 4 ++-- resources/views/partials/metrics.blade.php | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Models/Metric.php b/app/Models/Metric.php index 4b2627c2..68916833 100644 --- a/app/Models/Metric.php +++ b/app/Models/Metric.php @@ -80,13 +80,13 @@ class Metric extends Model implements HasPresenter } /** - * Returns the sum of all values a metric has. + * Returns the sum of all values a metric has by the hour. * * @param int $hour * * @return int */ - public function getValues($hour) + public function getValuesByHour($hour) { $dateTimeZone = SettingFacade::get('app_timezone'); $dateTime = (new Date())->setTimezone($dateTimeZone)->sub(new DateInterval('PT'.$hour.'H')); diff --git a/resources/views/partials/metrics.blade.php b/resources/views/partials/metrics.blade.php index f9a7a1ee..cf72478b 100644 --- a/resources/views/partials/metrics.blade.php +++ b/resources/views/partials/metrics.blade.php @@ -2,11 +2,11 @@