@@ -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\MsgApi\Tools; |
@@ -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\MsgApi\Tools; |
@@ -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\MsgApi\Tools; |
@@ -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 { |
@@ -41,8 +41,7 @@ |
||
41 | 41 | $storeHandle = fopen($this->file, 'r'); |
42 | 42 | if(false === $storeHandle) { |
43 | 43 | throw new Exception('could not open file '.$this->file); |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | $threemaId = strtoupper($threemaId); |
47 | 46 | $publicKey = null; |
48 | 47 | while (!feof($storeHandle)) { |
@@ -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\MsgApi\Tools; |
@@ -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 { |
@@ -41,8 +41,7 @@ |
||
41 | 41 | $storeHandle = fopen($this->file, 'r'); |
42 | 42 | if(false === $storeHandle) { |
43 | 43 | throw new Exception('could not open file '.$this->file); |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | $threemaId = strtoupper($threemaId); |
47 | 46 | $publicKey = null; |
48 | 47 | while (!feof($storeHandle)) { |
@@ -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\MsgApi\Tools; |
@@ -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 { |
@@ -41,8 +41,7 @@ |
||
41 | 41 | $storeHandle = fopen($this->file, 'r'); |
42 | 42 | if(false === $storeHandle) { |
43 | 43 | throw new Exception('could not open file '.$this->file); |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | $threemaId = strtoupper($threemaId); |
47 | 46 | $publicKey = null; |
48 | 47 | while (!feof($storeHandle)) { |
@@ -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\MsgApi\Tools; |
@@ -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\MsgApi\Tools; |
@@ -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 | } |
@@ -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\MsgApi\Tools; |
@@ -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\MsgApi\Tools; |
@@ -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 | } |