Skip to content

Commit 5296ef5

Browse files
authored
[Chore] Refactored get jitter data method (alexjustesen#1105)
1 parent 9a6de41 commit 5296ef5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Models/Result.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ public function getJitterData(): array
102102
$data = json_decode($this->data, true);
103103

104104
return [
105-
'download' => $data['download']['latency']['jitter'] ?? null,
106-
'upload' => $data['upload']['latency']['jitter'] ?? null,
107-
'ping' => $data['ping']['jitter'] ?? null,
105+
'download' => Arr::get($data, 'download.latency.jitter'),
106+
'upload' => Arr::get($data, 'upload.latency.jitter'),
107+
'ping' => Arr::get($data, 'ping.jitter'),
108108
];
109109
}
110110

0 commit comments

Comments
 (0)