Completed
Pull Request — official (#17)
by rugk
02:34
created
source/Threema/Console/Command/LookupPublicKeyById.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
44 44
 		$result = $connector->fetchPublicKey($id);
45 45
 		if($result->isSuccess()) {
46 46
 			Common::l(Common::convertPublicKey($result->getPublicKey()));
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/ReceiveMessage.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@
 block discarded – undo
71 71
 			foreach($message->getFiles() as $fileName => $filePath) {
72 72
 				Common::l('   received file '.$fileName.' in '.$filePath);
73 73
 			}
74
-		}
75
-		else {
74
+		} else {
76 75
 			Common::e('Error: '.implode("\n", $message->getErrors()));
77 76
 		}
78 77
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Command/SendE2EFile.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
 
56 56
 		if($result->isSuccess()) {
57 57
 			Common::l('Message ID: '.$result->getMessageId());
58
-		}
59
-		else {
58
+		} else {
60 59
 			Common::e('Error: '.$result->getErrorMessage());
61 60
 		}
62 61
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Command/SendE2EImage.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
 
54 54
 		if($result->isSuccess()) {
55 55
 			Common::l('Message ID: '.$result->getMessageId());
56
-		}
57
-		else {
56
+		} else {
58 57
 			Common::e('Error: '.$result->getErrorMessage());
59 58
 		}
60 59
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Command/SendE2EText.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
 
55 55
 		if($result->isSuccess()) {
56 56
 			Common::l('Message ID: '.$result->getMessageId());
57
-		}
58
-		else {
57
+		} else {
59 58
 			Common::e('Error: '.$result->getErrorMessage());
60 59
 		}
61 60
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Command/SendSimple.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
 		$result = $connector->sendSimple($receiver, $message);
52 52
 		if($result->isSuccess()) {
53 53
 			Common::l('Message ID: '.$result->getMessageId());
54
-		}
55
-		else {
54
+		} else {
56 55
 			Common::l('Error: '.$result->getErrorMessage());
57 56
 		}
58 57
 	}
Please login to merge, or discard this patch.
source/Threema/Console/Run.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -138,14 +138,12 @@  discard block
 block discarded – undo
138 138
 
139 139
 		if(null === $found) {
140 140
 			$this->help();
141
-		}
142
-		else {
141
+		} else {
143 142
 
144 143
 
145 144
 			try {
146 145
 				$found->run($this->arguments);
147
-			}
148
-			catch(Exception $x) {
146
+			} catch(Exception $x) {
149 147
 				Common::l();
150 148
 				Common::e('ERROR: '.$x->getMessage());
151 149
 				Common::e(get_class($x));
@@ -168,8 +166,7 @@  discard block
 block discarded – undo
168 166
 				Common::l($data);
169 167
 				Common::l(str_repeat('-', strlen($data)));
170 168
 				Common::l();
171
-			}
172
-			else {
169
+			} else {
173 170
 				list($key, $command) = $data;
174 171
 				Common::ln($this->scriptName.' '."\033[1;33m".implode(' ', $key)."\033[0m".' '.$command->help());
175 172
 				Common::l();
@@ -186,8 +183,7 @@  discard block
 block discarded – undo
186 183
 			foreach($this->commands as $data) {
187 184
 				if(is_scalar($data)) {
188 185
 					$writer->__invoke($data, null, null, false);
189
-				}
190
-				else {
186
+				} else {
191 187
 					list($key, $command) = $data;
192 188
 					$writer->__invoke($command->subject(false), $this->scriptName.' '.implode(' ', $key).' '.$command->help(false), $command->description(), true);
193 189
 				}
Please login to merge, or discard this patch.
source/Threema/MsgApi/Helpers/E2EHelper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,8 +247,7 @@
 block discarded – undo
247 247
 
248 248
 				$receiveResult->addFile('image', $filePath);
249 249
 			}
250
-		}
251
-		else if($message instanceof FileMessage) {
250
+		} else if($message instanceof FileMessage) {
252 251
 			$result = $this->downloadFile($message, $message->getBlobId(), $downloadMessage);
253 252
 
254 253
 			if(null !== $result && true === $result->isSuccess()) {
Please login to merge, or discard this patch.
source/Threema/MsgApi/PublicKeyStores/File.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
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)) {
Please login to merge, or discard this patch.