Completed
Push — master ( 382c63...5355c1 )
by rugk
02:29
created
source/Threema/MsgApi/PublicKeyStores/PhpFile.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 	public function __construct($file)
44 44
 	{
45 45
 		if (false === is_writable($file)) {
46
-			throw new Exception('file ' . $file . ' does not exist or is not writable');
46
+			throw new Exception('file '.$file.' does not exist or is not writable');
47 47
 		}
48 48
 		if (pathinfo($file, PATHINFO_EXTENSION) != 'php') {
49
-			throw new Exception('file ' . $file . ' is not a valid PHP file');
49
+			throw new Exception('file '.$file.' is not a valid PHP file');
50 50
 		}
51 51
 		$this->file = $file;
52 52
 	}
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 
105 105
 		//add key
106 106
 		$this->keystore[$threemaId] = $publicKey;
107
-		$content = '$keystore[\'' . $threemaId . '\'] = \'' . $publicKey . '\';' . PHP_EOL;
107
+		$content = '$keystore[\''.$threemaId.'\'] = \''.$publicKey.'\';'.PHP_EOL;
108 108
 
109 109
 		//write content
110 110
 		$fileadd = file_put_contents($this->file, $content, FILE_APPEND);
111 111
 		if (!$fileadd) {
112
-			throw new Exception('could not write to file ' . $this->file);
112
+			throw new Exception('could not write to file '.$this->file);
113 113
 		}
114 114
 
115 115
 		return true;
@@ -137,28 +137,28 @@  discard block
 block discarded – undo
137 137
 
138 138
 			//check for success
139 139
 			if (null === $fileHandle) {
140
-				throw new Exception('could not open file ' . $this->file);
140
+				throw new Exception('could not open file '.$this->file);
141 141
 			}
142 142
 		}
143 143
 
144 144
 		//create content
145
-		$content = $this->fileBlocker . PHP_EOL;
145
+		$content = $this->fileBlocker.PHP_EOL;
146 146
 		$content .= PHP_EOL;
147
-		$content .= '//Threema MsgApi phpfile keystore' . PHP_EOL;
148
-		$content .= '//DO NOT EDIT THIS FILE!' . PHP_EOL;
147
+		$content .= '//Threema MsgApi phpfile keystore'.PHP_EOL;
148
+		$content .= '//DO NOT EDIT THIS FILE!'.PHP_EOL;
149 149
 		$content .= PHP_EOL;
150 150
 
151 151
 		//write file
152 152
 		$fwrite = fwrite($fileHandle, $content);
153 153
 		if (!$fwrite) {
154
-			throw new Exception('could not write to file ' . $this->file);
154
+			throw new Exception('could not write to file '.$this->file);
155 155
 		}
156 156
 
157 157
 		//close file if necessary
158 158
 		if ($fileopened) {
159 159
 			$fclose = fclose($fileHandle);
160 160
 			if (!$fclose) {
161
-				throw new Exception('error while processing file ' . $this->file);
161
+				throw new Exception('error while processing file '.$this->file);
162 162
 			}
163 163
 		}
164 164
 		return true;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 * @return PhpFile
171 171
 	 */
172 172
 	public static function create($path) {
173
-		if(false === file_exists($path)) {
173
+		if (false === file_exists($path)) {
174 174
 			//touch
175 175
 			touch($path);
176 176
 		}
Please login to merge, or discard this patch.
source/Threema/MsgApi/Receiver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	 * @throws \InvalidArgumentException
74 74
 	 */
75 75
 	public function getParams() {
76
-		switch($this->type) {
76
+		switch ($this->type) {
77 77
 			case self::TYPE_ID:
78 78
 				$to = $this->type;
79 79
 				$this->value = strtoupper(trim($this->value));
Please login to merge, or discard this patch.
source/Threema/MsgApi/Tools/CryptToolSalt.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @return null|string
49 49
 	 */
50 50
 	protected function openBox($box, $recipientPrivateKey, $senderPublicKey, $nonce) {
51
-		$boxPad = str_repeat("\x00", 16) . $box;
51
+		$boxPad = str_repeat("\x00", 16).$box;
52 52
 		try {
53 53
 			$data = Salt::box_open($boxPad, $recipientPrivateKey, $senderPublicKey, $nonce);
54 54
 		} catch (\SaltException $e) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @return string as binary
72 72
 	 */
73 73
 	protected function openSecretBox($box, $nonce, $key) {
74
-		$boxPad = str_repeat("\x00", 16) . $box;
74
+		$boxPad = str_repeat("\x00", 16).$box;
75 75
 		$data = Salt::secretbox_open($boxPad, $nonce, $key);
76 76
 
77 77
 		if ($data) {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			Salt::decodeInput($nonce),
131 131
 			$key);
132 132
 
133
-		if($data === false) {
133
+		if ($data === false) {
134 134
 			throw new Exception('encryption failed');
135 135
 		}
136 136
 
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
 	 * @throws Exception
153 153
 	 */
154 154
 	public function validate() {
155
-		if(false === $this->isSupported()) {
155
+		if (false === $this->isSupported()) {
156 156
 			throw new Exception('SALT implementation not supported');
157 157
 		}
158 158
 
159
-		if(PHP_INT_SIZE < 8) {
159
+		if (PHP_INT_SIZE < 8) {
160 160
 			throw new Exception('Pure PHP Crypto implementation requires 64Bit PHP. Please install the libsodium PHP extension.');
161 161
 		}
162 162
 		return true;
Please login to merge, or discard this patch.
source/Threema/MsgApi/Tools/CryptToolSodium.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 	 * @throws Exception
122 122
 	 */
123 123
 	public function validate() {
124
-		if(false === $this->isSupported()) {
124
+		if (false === $this->isSupported()) {
125 125
 			throw new Exception('Sodium implementation not supported');
126 126
 		}
127 127
 		return true;
Please login to merge, or discard this patch.
source/Threema/MsgApi/Tools/FileAnalysisTool.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public static function analyse($file) {
16 16
 		//check if file exists
17
-		if(false === file_exists($file)) {
17
+		if (false === file_exists($file)) {
18 18
 			return null;
19 19
 		}
20 20
 
21 21
 		//is not a file
22
-		if(false === is_file($file)) {
22
+		if (false === is_file($file)) {
23 23
 			return null;
24 24
 		}
25 25
 
@@ -28,16 +28,16 @@  discard block
 block discarded – undo
28 28
 
29 29
 		$mimeType = null;
30 30
 		//mime type getter
31
-		if(function_exists('finfo_open')) {
31
+		if (function_exists('finfo_open')) {
32 32
 			$finfo = finfo_open(FILEINFO_MIME_TYPE);
33 33
 			$mimeType = finfo_file($finfo, $file);
34 34
 		}
35
-		else if(function_exists('mime_content_type')) {
35
+		else if (function_exists('mime_content_type')) {
36 36
 			$mimeType = mime_content_type($file);
37 37
 		}
38 38
 
39 39
 		//default mime type
40
-		if(strlen($mimeType) == 0) {
40
+		if (strlen($mimeType) == 0) {
41 41
 			//default mime type
42 42
 			$mimeType = 'application/octet-stream';
43 43
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@
 block discarded – undo
31 31
 		if(function_exists('finfo_open')) {
32 32
 			$finfo = finfo_open(FILEINFO_MIME_TYPE);
33 33
 			$mimeType = finfo_file($finfo, $file);
34
-		}
35
-		else if(function_exists('mime_content_type')) {
34
+		} else if(function_exists('mime_content_type')) {
36 35
 			$mimeType = mime_content_type($file);
37 36
 		}
38 37
 
Please login to merge, or discard this patch.
threema-msgapi-tool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
source/Threema/MsgApi/Tools/CryptTool.php 3 patches
Doc Comments   +15 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,6 +142,11 @@  discard block
 block discarded – undo
142 142
 		return $this->makeBox($message, $nonce, $senderPrivateKey, $recipientPublicKey);
143 143
 	}
144 144
 
145
+	/**
146
+	 * @param string $senderPrivateKey
147
+	 * @param string $recipientPublicKey
148
+	 * @param string $nonce
149
+	 */
145 150
 	final public function encryptFileMessage(UploadFileResult $uploadFileResult,
146 151
 											 EncryptResult $encryptResult,
147 152
 											 UploadFileResult $thumbnailUploadFileResult = null,
@@ -190,9 +195,9 @@  discard block
 block discarded – undo
190 195
 	 * make a secret box
191 196
 	 *
192 197
 	 * @param $data
193
-	 * @param $nonce
198
+	 * @param string $nonce
194 199
 	 * @param $key
195
-	 * @return mixed
200
+	 * @return string
196 201
 	 */
197 202
 	abstract protected function makeSecretBox($data, $nonce, $key);
198 203
 
@@ -334,6 +339,9 @@  discard block
 block discarded – undo
334 339
 		return hash_hmac('sha256', $phoneNoClean, self::PHONENO_HMAC_KEY);
335 340
 	}
336 341
 
342
+	/**
343
+	 * @return string
344
+	 */
337 345
 	abstract protected function createRandom($size);
338 346
 
339 347
 	/**
@@ -376,7 +384,7 @@  discard block
 block discarded – undo
376 384
 	abstract public function validate();
377 385
 
378 386
 	/**
379
-	 * @param $data
387
+	 * @param string $data
380 388
 	 * @return EncryptResult
381 389
 	 */
382 390
 	public final function encryptFile($data) {
@@ -405,6 +413,10 @@  discard block
 block discarded – undo
405 413
 		return new EncryptResult($box, $key,  self::FILE_THUMBNAIL_NONCE, strlen($box));
406 414
 	}
407 415
 
416
+	/**
417
+	 * @param string $data
418
+	 * @param string $key
419
+	 */
408 420
 	public final function decryptFileThumbnail($data, $key) {
409 421
 		$result = $this->openSecretBox($data, self::FILE_THUMBNAIL_NONCE, $key);
410 422
 		return false === $result ? null : $result;
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 * @return CryptTool
43 43
 	 */
44 44
 	public static function getInstance() {
45
-		if(null === self::$instance) {
46
-			foreach(array(
45
+		if (null === self::$instance) {
46
+			foreach (array(
47 47
 				function() {
48 48
 					return self::createInstance(self::TYPE_SODIUM);
49 49
 				},
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 					return self::createInstance(self::TYPE_SALT);
52 52
 				}) as $instanceGenerator) {
53 53
 				$i = $instanceGenerator->__invoke();
54
-				if(null !== $i) {
54
+				if (null !== $i) {
55 55
 					self::$instance = $i;
56 56
 					break;
57 57
 				}
@@ -66,18 +66,18 @@  discard block
 block discarded – undo
66 66
 	 * @return null|CryptTool null on unknown type
67 67
 	 */
68 68
 	public static function createInstance($type) {
69
-		switch($type) {
69
+		switch ($type) {
70 70
 			case self::TYPE_SODIUM:
71 71
 				$instance = new CryptToolSodium();
72
-				if(false === $instance->isSupported()) {
72
+				if (false === $instance->isSupported()) {
73 73
 					//try to instance old version of sodium wrapper
74 74
 					/** @noinspection PhpDeprecationInspection */
75 75
 					$instance = new CryptToolSodiumDep();
76 76
 				}
77
-				return $instance->isSupported() ? $instance :null;
77
+				return $instance->isSupported() ? $instance : null;
78 78
 			case self::TYPE_SALT:
79 79
 				$instance = new CryptToolSalt();
80
-				return $instance->isSupported() ? $instance :null;
80
+				return $instance->isSupported() ? $instance : null;
81 81
 			default:
82 82
 				return null;
83 83
 		}
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	final public function encryptMessageText($text, $senderPrivateKey, $recipientPublicKey, $nonce) {
107 107
 		/* prepend type byte (0x01) to message data */
108
-		$textBytes = "\x01" . $text;
108
+		$textBytes = "\x01".$text;
109 109
 
110 110
 		/* determine random amount of PKCS7 padding */
111 111
 		$padbytes = $this->generatePadBytes();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			$senderPrivateKey,
131 131
 			$recipientPublicKey,
132 132
 			$nonce) {
133
-		$message = "\x02" . $this->hex2bin($uploadFileResult->getBlobId());
133
+		$message = "\x02".$this->hex2bin($uploadFileResult->getBlobId());
134 134
 		$message .= pack('V', $encryptResult->getSize());
135 135
 		$message .= $encryptResult->getNonce();
136 136
 
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
 			'i' => 0
162 162
 		);
163 163
 
164
-		if($thumbnailUploadFileResult !== null && strlen($thumbnailUploadFileResult->getBlobId()) > 0) {
164
+		if ($thumbnailUploadFileResult !== null && strlen($thumbnailUploadFileResult->getBlobId()) > 0) {
165 165
 			$messageContent['t'] = $thumbnailUploadFileResult->getBlobId();
166 166
 		}
167 167
 
168
-		$message = "\x17" . json_encode($messageContent);
168
+		$message = "\x17".json_encode($messageContent);
169 169
 
170 170
 		/* determine random amount of PKCS7 padding */
171 171
 		$padbytes = $this->generatePadBytes();
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
 		/* remove padding */
240 240
 		$padbytes = ord($data[strlen($data)-1]);
241
-		$realDataLength = strlen($data) - $padbytes;
241
+		$realDataLength = strlen($data)-$padbytes;
242 242
 		if ($realDataLength < 1) {
243 243
 			throw new BadMessageException();
244 244
 		}
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 				return new TextMessage(substr($data, 1));
265 265
 			case DeliveryReceipt::TYPE_CODE:
266 266
 				/* Delivery receipt */
267
-				if ($realDataLength < (self::MESSAGE_ID_LEN-2) || (($realDataLength - 2) % self::MESSAGE_ID_LEN) != 0)  {
267
+				if ($realDataLength < (self::MESSAGE_ID_LEN-2) || (($realDataLength-2)%self::MESSAGE_ID_LEN) != 0) {
268 268
 					throw new BadMessageException();
269 269
 				}
270 270
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 				return new DeliveryReceipt($receiptType, $messageIds);
275 275
 			case ImageMessage::TYPE_CODE:
276 276
 				/* Image Message */
277
-				if ($realDataLength != 1 + self::BLOB_ID_LEN + self::IMAGE_FILE_SIZE_LEN + self::IMAGE_NONCE_LEN)  {
277
+				if ($realDataLength != 1+self::BLOB_ID_LEN+self::IMAGE_FILE_SIZE_LEN+self::IMAGE_NONCE_LEN) {
278 278
 					throw new BadMessageException();
279 279
 				}
280 280
 
@@ -285,12 +285,12 @@  discard block
 block discarded – undo
285 285
 			case FileMessage::TYPE_CODE:
286 286
 				/* Image Message */
287 287
 				$decodeResult = json_decode(substr($data, 1), true);
288
-				if(null === $decodeResult || false === $decodeResult) {
288
+				if (null === $decodeResult || false === $decodeResult) {
289 289
 					throw new BadMessageException();
290 290
 				}
291 291
 
292 292
 				$values = AssocArray::byJsonString(substr($data, 1), array('b', 't', 'k', 'm', 'n', 's'));
293
-				if(null === $values) {
293
+				if (null === $values) {
294 294
 					throw new BadMessageException();
295 295
 				}
296 296
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 	 * @return null|string
393 393
 	 */
394 394
 	public final function decryptFile($data, $key) {
395
-		$result =  $this->openSecretBox($data, self::FILE_NONCE, $key);
395
+		$result = $this->openSecretBox($data, self::FILE_NONCE, $key);
396 396
 		return false === $result ? null : $result;
397 397
 	}
398 398
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 	 */
404 404
 	public final function encryptFileThumbnail($data, $key) {
405 405
 		$box = $this->makeSecretBox($data, self::FILE_THUMBNAIL_NONCE, $key);
406
-		return new EncryptResult($box, $key,  self::FILE_THUMBNAIL_NONCE, strlen($box));
406
+		return new EncryptResult($box, $key, self::FILE_THUMBNAIL_NONCE, strlen($box));
407 407
 	}
408 408
 
409 409
 	public final function decryptFileThumbnail($data, $key) {
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 	 */
451 451
 	private function generatePadBytes() {
452 452
 		$padbytes = 0;
453
-		while($padbytes < 1 || $padbytes > 255) {
453
+		while ($padbytes < 1 || $padbytes > 255) {
454 454
 			$padbytes = ord($this->createRandom(1));
455 455
 		}
456 456
 		return $padbytes;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -529,8 +529,8 @@
 block discarded – undo
529 529
 			$ret = 0;
530 530
 			$length = strlen($str1);
531 531
 			for ($i = 0; $i < $length; ++$i) {
532
-	            $ret |= ord($str1[$i]) ^ ord($str2[$i]);
533
-	        }
532
+				$ret |= ord($str1[$i]) ^ ord($str2[$i]);
533
+			}
534 534
 			return 0 === $ret;
535 535
 		}
536 536
 	}
Please login to merge, or discard this patch.
source/Threema/MsgApi/Connection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
 			}
203 203
 		}
204 204
 		if ($tlsCipher = $this->setting->getTlsOption(ConnectionSettings::tlsOptionCipher, null)) {
205
-			if(true === is_string($tlsCipher)) {
205
+			if (true === is_string($tlsCipher)) {
206 206
 				$options[CURLOPT_SSL_CIPHER_LIST] = $tlsCipher;
207 207
 			}
208 208
 		}
209 209
 		if ($pinnedKey = $this->setting->getTlsOption(ConnectionSettings::tlsOptionPinnedKey, Constants::DEFAULT_PINNED_KEY)) {
210
-			if(true === is_string($pinnedKey)) {
210
+			if (true === is_string($pinnedKey)) {
211 211
 				$options[CURLOPT_PINNEDPUBLICKEY] = $pinnedKey;
212 212
 			}
213 213
 		}
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 		return $this->call($command->getPath(),
240 240
 			$this->createDefaultOptions($progress),
241 241
 			$params,
242
-			function ($httpCode, $response) use ($command) {
242
+			function($httpCode, $response) use ($command) {
243 243
 				return $command->parseResult($httpCode, $response);
244 244
 			});
245 245
 	}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		$options[CURLOPT_HTTPHEADER] = array(
258 258
 			'Content-Type: application/x-www-form-urlencoded');
259 259
 
260
-		return $this->call($command->getPath(), $options, null, function ($httpCode, $response) use ($command) {
260
+		return $this->call($command->getPath(), $options, null, function($httpCode, $response) use ($command) {
261 261
 			return $command->parseResult($httpCode, $response);
262 262
 		});
263 263
 	}
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 			'blob' => $command->getData()
278 278
 		);
279 279
 
280
-		return $this->call($command->getPath(), $options, $params, function ($httpCode, $response) use ($command) {
280
+		return $this->call($command->getPath(), $options, $params, function($httpCode, $response) use ($command) {
281 281
 			return $command->parseResult($httpCode, $response);
282 282
 		});
283 283
 	}
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 
305 305
 		$response = curl_exec($session);
306 306
 		if (false === $response) {
307
-			throw new Exception($path . ' ' . curl_error($session));
307
+			throw new Exception($path.' '.curl_error($session));
308 308
 		}
309 309
 
310 310
 		$httpCode = curl_getinfo($session, CURLINFO_HTTP_CODE);
Please login to merge, or discard this patch.
source/Threema/MsgApi/ConnectionSettings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,20 +49,20 @@
 block discarded – undo
49 49
 		$this->host = $host;
50 50
 
51 51
 		// TLS options
52
-		if(null !== $tlsOptions && is_array($tlsOptions)) {
53
-			if(true === array_key_exists(self::tlsOptionForceHttps, $tlsOptions)) {
52
+		if (null !== $tlsOptions && is_array($tlsOptions)) {
53
+			if (true === array_key_exists(self::tlsOptionForceHttps, $tlsOptions)) {
54 54
 				$this->tlsOptions[self::tlsOptionForceHttps] = $tlsOptions[self::tlsOptionForceHttps] === true;
55 55
 			}
56 56
 
57
-			if(true === array_key_exists(self::tlsOptionVersion, $tlsOptions)) {
57
+			if (true === array_key_exists(self::tlsOptionVersion, $tlsOptions)) {
58 58
 				$this->tlsOptions[self::tlsOptionVersion] = $tlsOptions[self::tlsOptionVersion];
59 59
 			}
60 60
 
61
-			if(true === array_key_exists(self::tlsOptionCipher, $tlsOptions)) {
61
+			if (true === array_key_exists(self::tlsOptionCipher, $tlsOptions)) {
62 62
 				$this->tlsOptions[self::tlsOptionCipher] = $tlsOptions[self::tlsOptionCipher];
63 63
 			}
64 64
 
65
-			if(true === array_key_exists(self::tlsOptionPinnedKey, $tlsOptions)) {
65
+			if (true === array_key_exists(self::tlsOptionPinnedKey, $tlsOptions)) {
66 66
 				$this->tlsOptions[self::tlsOptionPinnedKey] = $tlsOptions[self::tlsOptionPinnedKey];
67 67
 			}
68 68
 		}
Please login to merge, or discard this patch.