Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function notify($message, $severity = 'info', $event = null){ |
||
25 | curl_setopt_array($ch = curl_init(), array( |
||
26 | CURLOPT_URL => "https://www.notifymyandroid.com/publicapi/notify", |
||
27 | CURLOPT_POST => true, |
||
28 | CURLOPT_RETURNTRANSFER => true, |
||
29 | CURLOPT_POSTFIELDS => http_build_query($data = array( |
||
30 | "apikey" => $this->apiKey, |
||
31 | "application" => "CryptoGlance", |
||
32 | "description" => $message, |
||
33 | "content-type" => "text/html", |
||
34 | "event" => $event, |
||
35 | "priority" => array_search($severity, self::$priorities), |
||
36 | )), |
||
37 | )); |
||
38 | curl_exec($ch); |
||
39 | curl_close($ch); |
||
40 | } |
||
41 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.