Completed
Push — master ( 44e9c6...5609e7 )
by Michael
06:24
created
src/Client.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	private function authorise()
199 199
 	{
200
-		$url = $this->getOption('authoriseURL') . '?oauth_token=' . $this->token['key'];
200
+		$url = $this->getOption('authoriseURL').'?oauth_token='.$this->token['key'];
201 201
 
202 202
 		if ($this->getOption('scope'))
203 203
 		{
204 204
 			$scope = is_array($this->getOption('scope')) ? implode(' ', $this->getOption('scope')) : $this->getOption('scope');
205
-			$url .= '&scope=' . urlencode($scope);
205
+			$url .= '&scope='.urlencode($scope);
206 206
 		}
207 207
 
208 208
 		if ($this->getOption('sendheaders'))
@@ -343,11 +343,11 @@  discard block
 block discarded – undo
343 343
 		{
344 344
 			if (!strcmp($header, 'OAuth '))
345 345
 			{
346
-				$header .= $key . '="' . $this->safeEncode($value) . '"';
346
+				$header .= $key.'="'.$this->safeEncode($value).'"';
347 347
 			}
348 348
 			else
349 349
 			{
350
-				$header .= ', ' . $key . '="' . $value . '"';
350
+				$header .= ', '.$key.'="'.$value.'"';
351 351
 			}
352 352
 		}
353 353
 
@@ -374,11 +374,11 @@  discard block
 block discarded – undo
374 374
 				{
375 375
 					if (strpos($url, '?') === false)
376 376
 					{
377
-						$url .= '?' . $key . '=' . $v;
377
+						$url .= '?'.$key.'='.$v;
378 378
 					}
379 379
 					else
380 380
 					{
381
-						$url .= '&' . $key . '=' . $v;
381
+						$url .= '&'.$key.'='.$v;
382 382
 					}
383 383
 				}
384 384
 			}
@@ -391,11 +391,11 @@  discard block
 block discarded – undo
391 391
 
392 392
 				if (strpos($url, '?') === false)
393 393
 				{
394
-					$url .= '?' . $key . '=' . $value;
394
+					$url .= '?'.$key.'='.$value;
395 395
 				}
396 396
 				else
397 397
 				{
398
-					$url .= '&' . $key . '=' . $value;
398
+					$url .= '&'.$key.'='.$value;
399 399
 				}
400 400
 			}
401 401
 		}
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 		$rand = random_bytes(16);
521 521
 
522 522
 		// The md5s look nicer than numbers.
523
-		return md5($mt . $rand);
523
+		return md5($mt.$rand);
524 524
 	}
525 525
 
526 526
 	/**
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 	 */
533 533
 	private function prepareSigningKey()
534 534
 	{
535
-		return $this->safeEncode($this->getOption('consumer_secret')) . '&' . $this->safeEncode(($this->token) ? $this->token['secret'] : '');
535
+		return $this->safeEncode($this->getOption('consumer_secret')).'&'.$this->safeEncode(($this->token) ? $this->token['secret'] : '');
536 536
 	}
537 537
 
538 538
 	/**
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -93,8 +93,7 @@  discard block
 block discarded – undo
93 93
 			if ($response)
94 94
 			{
95 95
 				return $this->token;
96
-			}
97
-			else
96
+			} else
98 97
 			{
99 98
 				$this->token = null;
100 99
 			}
@@ -104,8 +103,7 @@  discard block
 block discarded – undo
104 103
 		if (strcmp($this->version, '1.0a') === 0)
105 104
 		{
106 105
 			$verifier = $this->input->get('oauth_verifier');
107
-		}
108
-		else
106
+		} else
109 107
 		{
110 108
 			$verifier = $this->input->get('oauth_token');
111 109
 		}
@@ -163,8 +161,7 @@  discard block
 block discarded – undo
163 161
 			$parameters = array(
164 162
 				'oauth_callback' => $this->getOption('callback')
165 163
 			);
166
-		}
167
-		else
164
+		} else
168 165
 		{
169 166
 			$parameters = array();
170 167
 		}
@@ -270,8 +267,7 @@  discard block
 block discarded – undo
270 267
 		if (isset($headers['Content-Type']) && strpos($headers['Content-Type'], 'multipart/form-data') !== false || !is_array($data))
271 268
 		{
272 269
 			$oauthHeaders = $parameters;
273
-		}
274
-		else
270
+		} else
275 271
 		{
276 272
 			// Use all parameters for the signature.
277 273
 			$oauthHeaders = array_merge($parameters, $data);
@@ -344,8 +340,7 @@  discard block
 block discarded – undo
344 340
 			if (!strcmp($header, 'OAuth '))
345 341
 			{
346 342
 				$header .= $key . '="' . $this->safeEncode($value) . '"';
347
-			}
348
-			else
343
+			} else
349 344
 			{
350 345
 				$header .= ', ' . $key . '="' . $value . '"';
351 346
 			}
@@ -375,14 +370,12 @@  discard block
 block discarded – undo
375 370
 					if (strpos($url, '?') === false)
376 371
 					{
377 372
 						$url .= '?' . $key . '=' . $v;
378
-					}
379
-					else
373
+					} else
380 374
 					{
381 375
 						$url .= '&' . $key . '=' . $v;
382 376
 					}
383 377
 				}
384
-			}
385
-			else
378
+			} else
386 379
 			{
387 380
 				if (strpos($value, ' ') !== false)
388 381
 				{
@@ -392,8 +385,7 @@  discard block
 block discarded – undo
392 385
 				if (strpos($url, '?') === false)
393 386
 				{
394 387
 					$url .= '?' . $key . '=' . $value;
395
-				}
396
-				else
388
+				} else
397 389
 				{
398 390
 					$url .= '&' . $key . '=' . $value;
399 391
 				}
@@ -456,8 +448,7 @@  discard block
 block discarded – undo
456 448
 					$v = $this->safeEncode($v);
457 449
 					$kv[] = "{$key}={$v}";
458 450
 				}
459
-			}
460
-			else
451
+			} else
461 452
 			{
462 453
 				$value = $this->safeEncode($value);
463 454
 				$kv[] = "{$key}={$value}";
Please login to merge, or discard this patch.