@@ -27,9 +27,9 @@ |
||
| 27 | 27 | Receiver::TYPE_ID); |
| 28 | 28 | |
| 29 | 29 | $result = $connector->sendSimple($receiver, "This is a Test Message"); |
| 30 | -if($result->isSuccess()) { |
|
| 31 | - echo 'Message ID: '.$result->getMessageId() . "\n"; |
|
| 30 | +if ($result->isSuccess()) { |
|
| 31 | + echo 'Message ID: '.$result->getMessageId()."\n"; |
|
| 32 | 32 | } |
| 33 | 33 | else { |
| 34 | - echo 'Error: '.$result->getErrorMessage() . "\n"; |
|
| 34 | + echo 'Error: '.$result->getErrorMessage()."\n"; |
|
| 35 | 35 | } |
@@ -29,7 +29,6 @@ |
||
| 29 | 29 | $result = $connector->sendSimple($receiver, "This is a Test Message"); |
| 30 | 30 | if($result->isSuccess()) { |
| 31 | 31 | echo 'Message ID: '.$result->getMessageId() . "\n"; |
| 32 | -} |
|
| 33 | -else { |
|
| 32 | +} else { |
|
| 34 | 33 | echo 'Error: '.$result->getErrorMessage() . "\n"; |
| 35 | 34 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | Common::required($threemaId, $from, $secret); |
| 38 | 38 | |
| 39 | - if(strlen($threemaId) != 8) { |
|
| 39 | + if (strlen($threemaId) != 8) { |
|
| 40 | 40 | throw new Exception('invalid threema id'); |
| 41 | 41 | } |
| 42 | 42 | //define connection settings |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $result = $connector->keyCapability($threemaId); |
| 49 | 49 | Common::required($result); |
| 50 | - if($result->isSuccess()) { |
|
| 50 | + if ($result->isSuccess()) { |
|
| 51 | 51 | Common::l(implode("\n", $result->getCapabilities())); |
| 52 | 52 | } |
| 53 | 53 | else { |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | Common::required($result); |
| 50 | 50 | if($result->isSuccess()) { |
| 51 | 51 | Common::l(implode("\n", $result->getCapabilities())); |
| 52 | - } |
|
| 53 | - else { |
|
| 52 | + } else { |
|
| 54 | 53 | Common::e($result->getErrorMessage()); |
| 55 | 54 | } |
| 56 | 55 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | $result = $connector->credits(); |
| 44 | 44 | Common::required($result); |
| 45 | - if($result->isSuccess()) { |
|
| 45 | + if ($result->isSuccess()) { |
|
| 46 | 46 | Common::l("remaining credits: ".$result->getCredits()); |
| 47 | 47 | } |
| 48 | 48 | else { |
@@ -44,8 +44,7 @@ |
||
| 44 | 44 | Common::required($result); |
| 45 | 45 | if($result->isSuccess()) { |
| 46 | 46 | Common::l("remaining credits: ".$result->getCredits()); |
| 47 | - } |
|
| 48 | - else { |
|
| 47 | + } else { |
|
| 49 | 48 | Common::e($result->getErrorMessage()); |
| 50 | 49 | } |
| 51 | 50 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Threema GmbH |
|
| 4 | - * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | - */ |
|
| 3 | + * @author Threema GmbH |
|
| 4 | + * @copyright Copyright (c) 2015 Threema GmbH |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | namespace Threema\Console\Command; |