@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $this->response->setApiPath($path); |
226 | 226 | $url = sprintf('%s/%s', self::API_HOST_OAUTH, $path); |
227 | 227 | $request = Request::fromConsumerAndToken($this->consumer, $this->token, $method, $url, $parameters); |
228 | - $authorization = 'Authorization: Basic ' . $this->encodeAppAuthorization($this->consumer); |
|
228 | + $authorization = 'Authorization: Basic '.$this->encodeAppAuthorization($this->consumer); |
|
229 | 229 | $result = $this->request($request->getNormalizedHttpUrl(), $method, $authorization, $parameters); |
230 | 230 | $response = JsonDecoder::decode($result, $this->decodeJsonAsArray); |
231 | 231 | $this->response->setBody($response); |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $request->signRequest($this->signatureMethod, $this->consumer, $this->token); |
503 | 503 | $authorization = $request->toHeader(); |
504 | 504 | } else { |
505 | - $authorization = 'Authorization: Bearer ' . $this->bearer; |
|
505 | + $authorization = 'Authorization: Bearer '.$this->bearer; |
|
506 | 506 | } |
507 | 507 | if (strpos($url, TONUpload::DEFAULT_DOMAIN) === 0) { |
508 | 508 | return $this->request($url, $method, $authorization, $parameters, $headers); |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | /* Curl settings */ |
529 | 529 | $options = [ |
530 | 530 | CURLOPT_VERBOSE => false, |
531 | - CURLOPT_CAINFO => __DIR__ . DIRECTORY_SEPARATOR . 'cacert.pem', |
|
531 | + CURLOPT_CAINFO => __DIR__.DIRECTORY_SEPARATOR.'cacert.pem', |
|
532 | 532 | CURLOPT_CONNECTTIMEOUT => $this->connectionTimeout, |
533 | 533 | CURLOPT_HEADER => true, |
534 | 534 | CURLOPT_HTTPHEADER => array_merge(['Accept: */*', $authorization, 'Expect:'], $headers, ['Connection: close']), |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | } |
574 | 574 | |
575 | 575 | if (in_array($method, ['GET', 'PUT', 'DELETE']) && !empty($postfields) && !isset($postfields['raw'])) { |
576 | - $options[CURLOPT_URL] .= '?' . Util::buildHttpQuery($postfields); |
|
576 | + $options[CURLOPT_URL] .= '?'.Util::buildHttpQuery($postfields); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | $curlHandle = curl_init(); |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | $key = $consumer->key; |
650 | 650 | $secret = $consumer->secret; |
651 | 651 | |
652 | - return base64_encode($key . ':' . $secret); |
|
652 | + return base64_encode($key.':'.$secret); |
|
653 | 653 | } |
654 | 654 | |
655 | 655 | /** |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | */ |
684 | 684 | public function getAccountId() |
685 | 685 | { |
686 | - if(!$this->account instanceof Account){ |
|
686 | + if (!$this->account instanceof Account) { |
|
687 | 687 | return ''; |
688 | 688 | } |
689 | 689 | return $this->account->getId(); |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | */ |
695 | 695 | public function getAccountTimezone() |
696 | 696 | { |
697 | - if(!$this->account instanceof Account){ |
|
697 | + if (!$this->account instanceof Account) { |
|
698 | 698 | return 'UTC'; |
699 | 699 | } |
700 | 700 | return $this->account->getTimezone(); |
@@ -810,9 +810,9 @@ discard block |
||
810 | 810 | $token = $token['oauth_token']; |
811 | 811 | } |
812 | 812 | if (empty($sign_in_with_twitter)) { |
813 | - return $this->authorizeURL() . "?oauth_token={$token}"; |
|
813 | + return $this->authorizeURL()."?oauth_token={$token}"; |
|
814 | 814 | } else { |
815 | - return $this->authenticateURL() . "?oauth_token={$token}"; |
|
815 | + return $this->authenticateURL()."?oauth_token={$token}"; |
|
816 | 816 | } |
817 | 817 | } |
818 | 818 | } |