Completed
Push — master ( 77e6a8...f7b062 )
by smiley
02:40
created
src/GatewayEndpoint.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Class GatewayEndpoint
4
- *
5
- * @filesource   GatewayEndpoint.php
6
- * @created      02.04.2016
7
- * @package      chillerlan\Threema
8
- * @author       Smiley <[email protected]>
9
- * @copyright    2016 Smiley
10
- * @license      MIT
11
- */
3
+	 * Class GatewayEndpoint
4
+	 *
5
+	 * @filesource   GatewayEndpoint.php
6
+	 * @created      02.04.2016
7
+	 * @package      chillerlan\Threema
8
+	 * @author       Smiley <[email protected]>
9
+	 * @copyright    2016 Smiley
10
+	 * @license      MIT
11
+	 */
12 12
 
13 13
 namespace chillerlan\Threema;
14 14
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
 	}
199 199
 
200 200
 	/**
201
-	 * @param $email
201
+	 * @param string $email
202 202
 	 *
203 203
 	 * @return string
204 204
 	 * @throws \chillerlan\Threema\GatewayException
Please login to merge, or discard this patch.
src/CLIRunner.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 				return $this->log2cli($method->invokeArgs($this, $arguments));
107 107
 			}
108 108
 			catch(GatewayException $gatewayException){
109
-				return $this->log2cli('ERROR: '.$gatewayException->getMessage());
109
+				return $this->log2cli('ERROR: ' . $gatewayException->getMessage());
110 110
 			}
111 111
 		}
112 112
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 * @return string
122 122
 	 */
123 123
 	protected function log2cli(string $string):string{
124
-		return PHP_EOL.wordwrap($string, 78, PHP_EOL).PHP_EOL;
124
+		return PHP_EOL . wordwrap($string, 78, PHP_EOL) . PHP_EOL;
125 125
 	}
126 126
 
127 127
 	/**
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 			if(isset($p[1])){
165 165
 				if($p[0] === 'param'){
166 166
 					$p                    = (explode(' ', trim($p[1]), 3));
167
-					$name                 = '<'.trim($p[1], ' $').'>';
167
+					$name                 = '<' . trim($p[1], ' $') . '>';
168 168
 					$parsed->paramNames[] = $name;
169
-					$doc                  = isset($p[2]) ? $name.' '.trim($p[2]) : $name;
169
+					$doc                  = isset($p[2]) ? $name . ' ' . trim($p[2]) : $name;
170 170
 					$parsed->paramDoc[]   = $doc;
171 171
 				}
172 172
 				else if($p[0] === 'return'){
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 	 */
188 188
 	public function help():string{
189 189
 		// return info in case no command was found
190
-		$help = 'Threema Gateway CLI tool.'.PHP_EOL;
191
-		$help .= 'Crypto: '.$this->threemaGateway->cryptoVersion().PHP_EOL.PHP_EOL;
190
+		$help = 'Threema Gateway CLI tool.' . PHP_EOL;
191
+		$help .= 'Crypto: ' . $this->threemaGateway->cryptoVersion() . PHP_EOL . PHP_EOL;
192 192
 
193 193
 		foreach(self::COMMANDS as $command => $method){
194 194
 			$comment = $this->reflection->getMethod($method)->getDocComment();
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 			$comment = trim(array_shift($params));
199 199
 			$parsed  = $this->parseDocBlock($params);
200 200
 
201
-			$help .= PHP_EOL.'threema.php '.$command.' '.$parsed->paramNames.PHP_EOL;
202
-			$help .= str_repeat('-', strlen($command) + 12).PHP_EOL;
203
-			$help .= PHP_EOL.$comment.PHP_EOL;
204
-			$help .= PHP_EOL.$parsed->paramDoc.PHP_EOL;
205
-			$help .= PHP_EOL.'Returns: '.$parsed->returnDoc.PHP_EOL.PHP_EOL;
201
+			$help .= PHP_EOL . 'threema.php ' . $command . ' ' . $parsed->paramNames . PHP_EOL;
202
+			$help .= str_repeat('-', strlen($command) + 12) . PHP_EOL;
203
+			$help .= PHP_EOL . $comment . PHP_EOL;
204
+			$help .= PHP_EOL . $parsed->paramDoc . PHP_EOL;
205
+			$help .= PHP_EOL . 'Returns: ' . $parsed->returnDoc . PHP_EOL . PHP_EOL;
206 206
 		}
207 207
 
208 208
 		return $help;
@@ -218,15 +218,15 @@  discard block
 block discarded – undo
218 218
 		// @todo: check writable
219 219
 		if(!empty($privateKeyFile) && is_dir(dirname($privateKeyFile))){
220 220
 			file_put_contents($privateKeyFile, $keypair->privateKey);
221
-			$message .= 'Private key saved to: '.$privateKeyFile.PHP_EOL;
221
+			$message .= 'Private key saved to: ' . $privateKeyFile . PHP_EOL;
222 222
 		}
223 223
 
224 224
 		if(!empty($publicKeyFile) && is_dir(dirname($publicKeyFile))){
225 225
 			file_put_contents($publicKeyFile, $keypair->publicKey);
226
-			$message .= 'Public key saved to: '.$publicKeyFile.PHP_EOL;
226
+			$message .= 'Public key saved to: ' . $publicKeyFile . PHP_EOL;
227 227
 		}
228 228
 
229
-		return $message.PHP_EOL.'private:'.$keypair->privateKey.PHP_EOL.'public:'.$keypair->publicKey;
229
+		return $message . PHP_EOL . 'private:' . $keypair->privateKey . PHP_EOL . 'public:' . $keypair->publicKey;
230 230
 	}
231 231
 
232 232
 	/**
Please login to merge, or discard this patch.