Apply fixes from StyleCI (#12117)

* Apply fixes from StyleCI

* Disable style check
This commit is contained in:
Jellyfrog
2020-09-21 14:54:51 +02:00
committed by GitHub
parent 8ec9183df5
commit 77c531527c
752 changed files with 6238 additions and 5833 deletions

View File

@@ -21,10 +21,11 @@
* @package LibreNMS
* @subpackage Alerts
*/
namespace LibreNMS\Alert\Transport;
use LibreNMS\Enum\AlertState;
use LibreNMS\Alert\Transport;
use LibreNMS\Enum\AlertState;
class Clickatell extends Transport
{
@@ -32,6 +33,7 @@ class Clickatell extends Transport
{
$clickatell_opts['token'] = $this->config['clickatell-token'];
$clickatell_opts['to'] = preg_split('/([,\r\n]+)/', $this->config['clickatell-numbers']);
return $this->contactClickatell($obj, $clickatell_opts);
}
@@ -44,11 +46,12 @@ class Clickatell extends Transport
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$ret = curl_exec($curl);
$ret = curl_exec($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($code > 200) {
return var_dump($ret);
}
return true;
}
@@ -67,12 +70,12 @@ class Clickatell extends Transport
'name' => 'clickatell-numbers',
'descr' => 'Enter mobile numbers, can be new line or comma separated',
'type' => 'textarea',
]
],
],
'validation' => [
'clickatell-token' => 'required|string',
'clickatell-numbers' => 'required|string',
]
],
];
}
}