@@ -56,7 +56,7 @@ |
||
| 56 | 56 | ); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - #[\Override] |
|
| 59 | + #[\Override ] |
|
| 60 | 60 | public function send(string $identifier, string $message) { |
| 61 | 61 | $to = str_replace('+', '', $identifier); |
| 62 | 62 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - #[\Override] |
|
| 58 | + #[\Override ] |
|
| 59 | 59 | public function send(string $identifier, string $message) { |
| 60 | 60 | $tokenId = $this->getTokenId(); |
| 61 | 61 | $accessToken = $this->getAccessToken(); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | try { |
| 65 | 65 | $this->client->post('https://api.sipgate.com/v2/sessions/sms', [ |
| 66 | 66 | 'headers' => [ |
| 67 | - 'Authorization' => 'Basic ' . base64_encode("$tokenId:$accessToken"), |
|
| 67 | + 'Authorization' => 'Basic '.base64_encode("$tokenId:$accessToken"), |
|
| 68 | 68 | 'Content-Type' => 'application/json', |
| 69 | 69 | 'Accept' => 'application/json', |
| 70 | 70 | ], |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - #[\Override] |
|
| 46 | + #[\Override ] |
|
| 47 | 47 | public function send(string $identifier, string $message) { |
| 48 | 48 | try { |
| 49 | 49 | $this->client->post( |
@@ -51,14 +51,14 @@ discard block |
||
| 51 | 51 | [ |
| 52 | 52 | 'headers' => [ |
| 53 | 53 | 'Accept' => 'application/json', |
| 54 | - 'Authorization' => 'Bearer ' . $this->getApitoken(), |
|
| 54 | + 'Authorization' => 'Bearer '.$this->getApitoken(), |
|
| 55 | 55 | 'Content-Type' => 'application/json', |
| 56 | 56 | ], |
| 57 | 57 | 'json' => [ |
| 58 | 58 | 'body' => $message, |
| 59 | 59 | 'encoding' => 'plain', |
| 60 | 60 | 'originator' => 'Nextcloud', |
| 61 | - 'recipients' => [$identifier], |
|
| 61 | + 'recipients' => [ $identifier ], |
|
| 62 | 62 | 'route' => '1', |
| 63 | 63 | ], |
| 64 | 64 | ] |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - #[\Override] |
|
| 46 | + #[\Override ] |
|
| 47 | 47 | public function send(string $identifier, string $message) { |
| 48 | 48 | try { |
| 49 | 49 | $response = $this->client->get( |
@@ -49,17 +49,17 @@ discard block |
||
| 49 | 49 | ); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - #[\Override] |
|
| 52 | + #[\Override ] |
|
| 53 | 53 | public function send(string $identifier, string $message) { |
| 54 | 54 | $sender = $this->getSender(); |
| 55 | 55 | $token = $this->getToken(); |
| 56 | 56 | $url = 'https://api.smsapi.com/sms.do'; |
| 57 | 57 | |
| 58 | 58 | $params = [ |
| 59 | - 'to' => $identifier, //destination number |
|
| 60 | - 'from' => $sender, //sendername made in https://ssl.smsapi.com/sms_settings/sendernames |
|
| 61 | - 'message' => $message, //message content |
|
| 62 | - 'format' => 'json', //get response in json format |
|
| 59 | + 'to' => $identifier, //destination number |
|
| 60 | + 'from' => $sender, //sendername made in https://ssl.smsapi.com/sms_settings/sendernames |
|
| 61 | + 'message' => $message, //message content |
|
| 62 | + 'format' => 'json', //get response in json format |
|
| 63 | 63 | ]; |
| 64 | 64 | |
| 65 | 65 | try { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | curl_close($c); |
| 84 | 84 | $responseData = json_decode($content, true); |
| 85 | 85 | |
| 86 | - if ($responseData['count'] !== 1) { |
|
| 86 | + if ($responseData[ 'count' ] !== 1) { |
|
| 87 | 87 | throw new MessageTransmissionException(); |
| 88 | 88 | } |
| 89 | 89 | } catch (Exception $ex) { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - #[\Override] |
|
| 46 | + #[\Override ] |
|
| 47 | 47 | public function send(string $identifier, string $message) { |
| 48 | 48 | $apiKey = $this->getApiKey(); |
| 49 | 49 | try { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - #[\Override] |
|
| 54 | + #[\Override ] |
|
| 55 | 55 | public function send(string $identifier, string $message) { |
| 56 | 56 | try { |
| 57 | 57 | $from = $this->getFrom(); |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - #[\Override] |
|
| 58 | + #[\Override ] |
|
| 59 | 59 | public function send(string $identifier, string $message) { |
| 60 | 60 | $user = $this->getUsername(); |
| 61 | 61 | $password = $this->getPassword(); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | ); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - #[\Override] |
|
| 59 | + #[\Override ] |
|
| 60 | 60 | public function send(string $identifier, string $message) { |
| 61 | 61 | try { |
| 62 | 62 | $response = $this->client->get(vsprintf('https://api.clickatell.com/http/sendmsg?user=%s&password=%s&api_id=%u&to=%s&text=%s', [ |