@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | $url = 'https://api.smsapi.com/sms.do'; |
57 | 57 | |
58 | 58 | $params = array( |
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 { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | curl_close($c); |
81 | 81 | $responseData = json_decode($content->getBody(), true); |
82 | 82 | |
83 | - if ($responseData['count'] !== 1) { |
|
83 | + if ($responseData[ 'count' ] !== 1) { |
|
84 | 84 | throw new SmsTransmissionException(); |
85 | 85 | } |
86 | 86 | } catch (Exception $ex) { |
@@ -464,7 +464,7 @@ |
||
464 | 464 | } elseif (substr_count($sender, '@') !== 1) { |
465 | 465 | $output->writeln("XMPP-JID not valid!"); |
466 | 466 | } else { |
467 | - $username = explode('@', $sender)[0]; |
|
467 | + $username = explode('@', $sender)[ 0 ]; |
|
468 | 468 | } |
469 | 469 | endwhile; |
470 | 470 | $output->writeln("Using $sender as XMPP-JID.\nUsing $username as username."); |
@@ -58,13 +58,13 @@ |
||
58 | 58 | |
59 | 59 | protected function execute(InputInterface $input, OutputInterface $output) { |
60 | 60 | $signalConfigured = $this->signalGateway->getConfig()->isComplete(); |
61 | - $output->writeln('Signal gateway: ' . ($signalConfigured ? 'configured' : 'not configured')); |
|
61 | + $output->writeln('Signal gateway: '.($signalConfigured ? 'configured' : 'not configured')); |
|
62 | 62 | $smsConfigured = $this->smsGateway->getConfig()->isComplete(); |
63 | - $output->writeln('SMS gateway: ' . ($smsConfigured ? 'configured' : 'not configured')); |
|
63 | + $output->writeln('SMS gateway: '.($smsConfigured ? 'configured' : 'not configured')); |
|
64 | 64 | $telegramConfigured = $this->telegramGateway->getConfig()->isComplete(); |
65 | - $output->writeln('Telegram gateway: ' . ($telegramConfigured ? 'configured' : 'not configured')); |
|
65 | + $output->writeln('Telegram gateway: '.($telegramConfigured ? 'configured' : 'not configured')); |
|
66 | 66 | $xmppConfigured = $this->xmppGateway->getConfig()->isComplete(); |
67 | - $output->writeln('XMPP gateway: ' . ($xmppConfigured ? 'configured' : 'not configured')); |
|
67 | + $output->writeln('XMPP gateway: '.($xmppConfigured ? 'configured' : 'not configured')); |
|
68 | 68 | return 0; |
69 | 69 | } |
70 | 70 | } |