@@ -85,12 +85,12 @@ |
||
85 | 85 | |
86 | 86 | try { |
87 | 87 | $ch = curl_init(); |
88 | - curl_setopt($ch, CURLOPT_URL, $url ); |
|
89 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); |
|
90 | - curl_setopt($ch, CURLOPT_POST, 1 ); |
|
91 | - curl_setopt($ch, CURLOPT_POSTFIELDS, $message ); |
|
92 | - curl_setopt($ch, CURLOPT_USERPWD, $from.":".$password ); |
|
93 | - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain')); |
|
88 | + curl_setopt($ch, CURLOPT_URL, $url); |
|
89 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
90 | + curl_setopt($ch, CURLOPT_POST, 1); |
|
91 | + curl_setopt($ch, CURLOPT_POSTFIELDS, $message); |
|
92 | + curl_setopt($ch, CURLOPT_USERPWD, $from.":".$password); |
|
93 | + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain')); |
|
94 | 94 | $result = curl_exec($ch); |
95 | 95 | curl_close($ch); |
96 | 96 | $this->logger->debug("XMPP message to $identifier sent"); |
@@ -442,17 +442,17 @@ |
||
442 | 442 | private function configureXMPP(InputInterface $input, OutputInterface $output) { |
443 | 443 | $helper = $this->getHelper('question'); |
444 | 444 | $sender = ''; |
445 | - while (empty($sender) or substr_count($sender,'@') !== 1): |
|
445 | + while (empty($sender) or substr_count($sender, '@') !== 1): |
|
446 | 446 | $senderQuestion = new Question('Please enter your sender XMPP-JID: '); |
447 | 447 | $sender = $helper->ask($input, $output, $senderQuestion); |
448 | 448 | if (empty($sender)) { |
449 | 449 | $output->writeln("XMPP-JID must not be empty!"); |
450 | 450 | } |
451 | - elseif (substr_count($sender,'@') !== 1) { |
|
451 | + elseif (substr_count($sender, '@') !== 1) { |
|
452 | 452 | $output->writeln("XMPP-JID not valid!"); |
453 | 453 | } |
454 | 454 | else { |
455 | - $username = explode('@',$sender)[0]; |
|
455 | + $username = explode('@', $sender)[ 0 ]; |
|
456 | 456 | } |
457 | 457 | endwhile; |
458 | 458 | $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 | } |