Completed
Push — 2.0-dev ( bd0c1c...b55620 )
by Michael
06:37
created
src/Client.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	private function authorise()
211 211
 	{
212
-		$url = $this->getOption('authoriseURL') . '?oauth_token=' . $this->token['key'];
212
+		$url = $this->getOption('authoriseURL').'?oauth_token='.$this->token['key'];
213 213
 
214 214
 		if ($this->getOption('scope'))
215 215
 		{
216 216
 			$scope = \is_array($this->getOption('scope')) ? implode(' ', $this->getOption('scope')) : $this->getOption('scope');
217
-			$url .= '&scope=' . urlencode($scope);
217
+			$url .= '&scope='.urlencode($scope);
218 218
 		}
219 219
 
220 220
 		if ($this->getOption('sendheaders'))
@@ -358,11 +358,11 @@  discard block
 block discarded – undo
358 358
 		{
359 359
 			if (!strcmp($header, 'OAuth '))
360 360
 			{
361
-				$header .= $key . '="' . $this->safeEncode($value) . '"';
361
+				$header .= $key.'="'.$this->safeEncode($value).'"';
362 362
 			}
363 363
 			else
364 364
 			{
365
-				$header .= ', ' . $key . '="' . $value . '"';
365
+				$header .= ', '.$key.'="'.$value.'"';
366 366
 			}
367 367
 		}
368 368
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 						$url .= '&';
397 397
 					}
398 398
 
399
-					$url .= $key . '=' . $v;
399
+					$url .= $key.'='.$v;
400 400
 				}
401 401
 			}
402 402
 			else
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 					$url .= '&';
416 416
 				}
417 417
 
418
-				$url .= $key . '=' . $value;
418
+				$url .= $key.'='.$value;
419 419
 			}
420 420
 		}
421 421
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 	public static function generateNonce()
537 537
 	{
538 538
 		// The md5s look nicer than numbers.
539
-		return md5(microtime() . random_bytes(16));
539
+		return md5(microtime().random_bytes(16));
540 540
 	}
541 541
 
542 542
 	/**
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 	 */
549 549
 	private function prepareSigningKey(): string
550 550
 	{
551
-		return $this->safeEncode($this->getOption('consumer_secret')) . '&' . $this->safeEncode(($this->token) ? $this->token['secret'] : '');
551
+		return $this->safeEncode($this->getOption('consumer_secret')).'&'.$this->safeEncode(($this->token) ? $this->token['secret'] : '');
552 552
 	}
553 553
 
554 554
 	/**
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@  discard block
 block discarded – undo
121 121
 		if (strcmp($this->version, '1.0a') === 0)
122 122
 		{
123 123
 			$verifier = $this->input->get('oauth_verifier');
124
-		}
125
-		else
124
+		} else
126 125
 		{
127 126
 			$verifier = $this->input->get('oauth_token');
128 127
 		}
@@ -282,8 +281,7 @@  discard block
 block discarded – undo
282 281
 		if (isset($headers['Content-Type']) && strpos($headers['Content-Type'], 'multipart/form-data') !== false || !\is_array($data))
283 282
 		{
284 283
 			$oauthHeaders = $parameters;
285
-		}
286
-		else
284
+		} else
287 285
 		{
288 286
 			// Use all parameters for the signature.
289 287
 			$oauthHeaders = array_merge($parameters, $data);
@@ -359,8 +357,7 @@  discard block
 block discarded – undo
359 357
 			if (!strcmp($header, 'OAuth '))
360 358
 			{
361 359
 				$header .= $key . '="' . $this->safeEncode($value) . '"';
362
-			}
363
-			else
360
+			} else
364 361
 			{
365 362
 				$header .= ', ' . $key . '="' . $value . '"';
366 363
 			}
@@ -390,16 +387,14 @@  discard block
 block discarded – undo
390 387
 					if (strpos($url, '?') === false)
391 388
 					{
392 389
 						$url .= '?';
393
-					}
394
-					else
390
+					} else
395 391
 					{
396 392
 						$url .= '&';
397 393
 					}
398 394
 
399 395
 					$url .= $key . '=' . $v;
400 396
 				}
401
-			}
402
-			else
397
+			} else
403 398
 			{
404 399
 				if (strpos($value, ' ') !== false)
405 400
 				{
@@ -409,8 +404,7 @@  discard block
 block discarded – undo
409 404
 				if (strpos($url, '?') === false)
410 405
 				{
411 406
 					$url .= '?';
412
-				}
413
-				else
407
+				} else
414 408
 				{
415 409
 					$url .= '&';
416 410
 				}
@@ -475,8 +469,7 @@  discard block
 block discarded – undo
475 469
 					$v    = $this->safeEncode($v);
476 470
 					$kv[] = "{$key}={$v}";
477 471
 				}
478
-			}
479
-			else
472
+			} else
480 473
 			{
481 474
 				$value = $this->safeEncode($value);
482 475
 				$kv[]  = "{$key}={$value}";
Please login to merge, or discard this patch.