Completed
Pull Request — official (#17)
by rugk
02:34
created
samples/testSendSimple.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
source/Threema/Console/Command/Capability.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Command/Credits.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Command/Decrypt.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
source/Threema/Console/Command/DerivePublicKey.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
source/Threema/Console/Command/Encrypt.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
source/Threema/Console/Command/GenerateKeyPair.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
source/Threema/Console/Command/HashEmail.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
source/Threema/Console/Command/HashPhone.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.