mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI * Disable style check
This commit is contained in:
@@ -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',
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user