summaryrefslogtreecommitdiff
path: root/src/Controllers/Metrics
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controllers/Metrics')
-rw-r--r--src/Controllers/Metrics/Controller.php4
-rw-r--r--src/Controllers/Metrics/MetricsEngine.php3
-rw-r--r--src/Controllers/Metrics/Stats.php2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/Controllers/Metrics/Controller.php b/src/Controllers/Metrics/Controller.php
index 86c21562..e0824c05 100644
--- a/src/Controllers/Metrics/Controller.php
+++ b/src/Controllers/Metrics/Controller.php
@@ -117,7 +117,7 @@ class Controller extends BaseController
'type' => 'counter',
[
'labels' => ['level' => LogLevel::EMERGENCY],
- 'value' => $this->stats->logEntries(LogLevel::EMERGENCY)
+ 'value' => $this->stats->logEntries(LogLevel::EMERGENCY),
],
['labels' => ['level' => LogLevel::ALERT], 'value' => $this->stats->logEntries(LogLevel::ALERT)],
['labels' => ['level' => LogLevel::CRITICAL], 'value' => $this->stats->logEntries(LogLevel::CRITICAL)],
@@ -132,7 +132,7 @@ class Controller extends BaseController
$data['scrape_duration_seconds'] = [
'type' => 'gauge',
'help' => 'Duration of the current request',
- microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT', $now)
+ microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT', $now),
];
return $this->response
diff --git a/src/Controllers/Metrics/MetricsEngine.php b/src/Controllers/Metrics/MetricsEngine.php
index eeb47d8a..1e0f6957 100644
--- a/src/Controllers/Metrics/MetricsEngine.php
+++ b/src/Controllers/Metrics/MetricsEngine.php
@@ -69,7 +69,8 @@ class MetricsEngine implements EngineInterface
'%s%s %s',
$name,
$this->renderLabels($row),
- $this->renderValue($row));
+ $this->renderValue($row)
+ );
}
/**
diff --git a/src/Controllers/Metrics/Stats.php b/src/Controllers/Metrics/Stats.php
index c841be10..a2b37d0c 100644
--- a/src/Controllers/Metrics/Stats.php
+++ b/src/Controllers/Metrics/Stats.php
@@ -27,6 +27,7 @@ class Stats
*/
public function arrivedUsers($working = null): int
{
+ /** @var QueryBuilder $query */
$query = $this
->getQuery('users')
->join('users_state', 'user_id', '=', 'id')
@@ -40,7 +41,6 @@ class Stats
->distinct();
$query->where(function ($query) use ($working) {
- /** @var QueryBuilder $query */
if ($working) {
$query
->whereNotNull('ShiftEntry.SID')