From a87c99d8fe50c4a78dcd5b155b3beba31474eafb Mon Sep 17 00:00:00 2001 From: Thibault Debatty <thibault.debatty@gmail.com> Date: Mon, 3 Feb 2020 14:33:13 +0100 Subject: [PATCH] code clean --- app/Sensor/ClientVersion.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/Sensor/ClientVersion.php b/app/Sensor/ClientVersion.php index 807ef1f..b72a129 100644 --- a/app/Sensor/ClientVersion.php +++ b/app/Sensor/ClientVersion.php @@ -16,7 +16,8 @@ class ClientVersion extends \App\AbstractSensor public function manifest() { - $options = ['timeout' => 5.0]; + $options = [ + 'timeout' => 5.0]; $proxy = config("app.proxy", null); if ($proxy != null) { @@ -24,12 +25,7 @@ class ClientVersion extends \App\AbstractSensor } $client = new Client($options); - - try { - $json = $client->get(self::MANIFEST)->getBody(); - } catch (\Exception $ex) { - return ""; - } + $json = $client->get(self::MANIFEST)->getBody(); return json_decode($json)[0]; } -- GitLab