@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | //disallow using the cli tool in a web project |
| 9 | 9 | if ('cli' !== php_sapi_name() || null === $argv) { |
| 10 | 10 | //file not called from the cli |
| 11 | - die('please run ' . basename(__FILE__) . ' only in a cli. '. |
|
| 11 | + die('please run '.basename(__FILE__).' only in a cli. '. |
|
| 12 | 12 | 'To use the threema msgapi sdk in your web project, include the source/bootstrap.php or the threema_msgapi.phar file.'); |
| 13 | 13 | } |
| 14 | 14 | try { |
@@ -20,6 +20,6 @@ discard block |
||
| 20 | 20 | Threema\MsgApi\PublicKeyStores\PhpFile::create('keystore.php')); |
| 21 | 21 | $tool->run(); |
| 22 | 22 | } catch (\Threema\Core\Exception $exception) { |
| 23 | - echo "ERROR: " . $exception->getMessage() . "\n"; |
|
| 23 | + echo "ERROR: ".$exception->getMessage()."\n"; |
|
| 24 | 24 | die(); |
| 25 | 25 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $helper = new E2EHelper($privateKey, $connector); |
| 52 | 52 | $result = $helper->sendImageMessage($threemaId, $path); |
| 53 | 53 | |
| 54 | - if($result->isSuccess()) { |
|
| 54 | + if ($result->isSuccess()) { |
|
| 55 | 55 | Common::l('Message ID: '.$result->getMessageId()); |
| 56 | 56 | } |
| 57 | 57 | else { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $helper = new E2EHelper($privateKey, $connector); |
| 52 | 52 | $result = $helper->sendImageMessage($threemaId, $path); |
| 53 | 53 | |
| 54 | - if($result->isSuccess()) { |
|
| 54 | + if ($result->isSuccess()) { |
|
| 55 | 55 | Common::l('Message ID: '.$result->getMessageId()); |
| 56 | 56 | } |
| 57 | 57 | else { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $helper = new E2EHelper($privateKey, $connector); |
| 52 | 52 | $result = $helper->sendImageMessage($threemaId, $path); |
| 53 | 53 | |
| 54 | - if($result->isSuccess()) { |
|
| 54 | + if ($result->isSuccess()) { |
|
| 55 | 55 | Common::l('Message ID: '.$result->getMessageId()); |
| 56 | 56 | } |
| 57 | 57 | else { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | Common::required($to, $from, $secret); |
| 37 | 37 | |
| 38 | 38 | $message = $this->readStdIn(); |
| 39 | - if(strlen($message) === 0) { |
|
| 39 | + if (strlen($message) === 0) { |
|
| 40 | 40 | throw new \InvalidArgumentException('please define a message'); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $receiver = new Receiver($to, Receiver::TYPE_ID); |
| 50 | 50 | |
| 51 | 51 | $result = $connector->sendSimple($receiver, $message); |
| 52 | - if($result->isSuccess()) { |
|
| 52 | + if ($result->isSuccess()) { |
|
| 53 | 53 | Common::l('Message ID: '.$result->getMessageId()); |
| 54 | 54 | } |
| 55 | 55 | else { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * @param object $res |
| 49 | 49 | * @return UploadFileResult |
| 50 | 50 | */ |
| 51 | - function parseResult($httpCode, $res){ |
|
| 51 | + function parseResult($httpCode, $res) { |
|
| 52 | 52 | return new UploadFileResult($httpCode, $res); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * @param object $res |
| 49 | 49 | * @return UploadFileResult |
| 50 | 50 | */ |
| 51 | - function parseResult($httpCode, $res){ |
|
| 51 | + function parseResult($httpCode, $res) { |
|
| 52 | 52 | return new UploadFileResult($httpCode, $res); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * @param object $res |
| 49 | 49 | * @return UploadFileResult |
| 50 | 50 | */ |
| 51 | - function parseResult($httpCode, $res){ |
|
| 51 | + function parseResult($httpCode, $res) { |
|
| 52 | 52 | return new UploadFileResult($httpCode, $res); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * @param object $res |
| 49 | 49 | * @return UploadFileResult |
| 50 | 50 | */ |
| 51 | - function parseResult($httpCode, $res){ |
|
| 51 | + function parseResult($httpCode, $res) { |
|
| 52 | 52 | return new UploadFileResult($httpCode, $res); |
| 53 | 53 | } |
| 54 | 54 | } |