Skip to content

Commit 0c72e5e

Browse files
authored
Apply fixes from StyleCI (#2962)
[ci skip] [skip ci]
1 parent 83bc743 commit 0c72e5e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/Repositories/Metric/AbstractMetricRepository.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ public function __construct(Repository $config)
5050
/**
5151
* Get the table names prefix.
5252
*
53-
* @return string
53+
* @return string
5454
*/
5555
protected function getPrefix()
5656
{
5757
$driver = $this->config->get('database.default');
5858
$connection = $this->config->get('database.connections.'.$driver);
5959
$prefix = $connection['prefix'];
60+
6061
return $prefix;
6162
}
6263

@@ -68,17 +69,19 @@ protected function getPrefix()
6869
protected function getTableName()
6970
{
7071
$prefix = $this->getPrefix();
72+
7173
return $prefix.'metrics';
7274
}
7375

7476
/**
7577
* Get the metric points table name.
7678
*
77-
* @return string
79+
* @return string
7880
*/
7981
protected function getMetricPointsTableName()
8082
{
8183
$prefix = $this->getPrefix();
84+
8285
return $prefix.'metric_points';
8386
}
8487
}

app/Repositories/Metric/MySqlRepository.php

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public function getPointsLastHour(Metric $metric, $hour, $minute)
3838
$timeInterval = $dateTime->format('YmdHi');
3939
$metricPointsTableName = $this->getMetricPointsTableName();
4040

41-
4241
if (!isset($metric->calc_type) || $metric->calc_type == Metric::CALC_SUM) {
4342
$queryType = 'SUM(mp.`value` * mp.`counter`) AS `value`';
4443
} elseif ($metric->calc_type == Metric::CALC_AVG) {

0 commit comments

Comments
 (0)