@@ -33,6 +33,6 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function getIdentifyUrl() : string |
| 35 | 35 | { |
| 36 | - return static::URL_IDENTIFY . $this->shouldProvideEmailAddress() ? '?include_email=true' : ''; |
|
| 36 | + return static::URL_IDENTIFY.$this->shouldProvideEmailAddress() ? '?include_email=true' : ''; |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @return string |
| 62 | 62 | */ |
| 63 | - public function getDescription() : ?string |
|
| 63 | + public function getDescription() : ? string |
|
| 64 | 64 | { |
| 65 | 65 | return $this->description; |
| 66 | 66 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return string |
| 72 | 72 | */ |
| 73 | - public function getLocation() : ?string |
|
| 73 | + public function getLocation() : ? string |
|
| 74 | 74 | { |
| 75 | 75 | return $this->location; |
| 76 | 76 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * |
| 81 | 81 | * @return int |
| 82 | 82 | */ |
| 83 | - public function getFollowersCount() : ?int |
|
| 83 | + public function getFollowersCount() : ? int |
|
| 84 | 84 | { |
| 85 | 85 | return $this->followersCount; |
| 86 | 86 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function setMethod(string $method) : Authorization |
| 91 | 91 | { |
| 92 | - switch($method) { |
|
| 92 | + switch ($method) { |
|
| 93 | 93 | case self::METHOD_HEADER: |
| 94 | 94 | case self::METHOD_QUERY: |
| 95 | 95 | $this->method = $method; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function __invoke(callable $handler) : callable |
| 110 | 110 | { |
| 111 | - return function ($request, array& $stackOptions) use ($handler) { |
|
| 111 | + return function($request, array& $stackOptions) use ($handler) { |
|
| 112 | 112 | |
| 113 | 113 | // Skip to the next handler if we weren't asked to do any stuff. |
| 114 | 114 | if (!isset($stackOptions['oauth1'])) { |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | // so we might just as well make all the parameters we gather and append more easily accessible |
| 120 | 120 | // by pushing into the $stackOptions directly in case there actually *are* handlers in the stack |
| 121 | 121 | // that have to do some post-processing after us. |
| 122 | - $handlerOptions =& $stackOptions['oauth1'] ?: $stackOptions['oauth1'] = []; |
|
| 122 | + $handlerOptions = & $stackOptions['oauth1'] ?: $stackOptions['oauth1'] = []; |
|
| 123 | 123 | |
| 124 | 124 | $this->parseOptions($handlerOptions); |
| 125 | 125 | $this->gatherAuthorizationParams($handlerOptions); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | // Unite our base parameters (which cannot be overridden) with the optional ones passed in. |
| 188 | 188 | $options['params'] = [ |
| 189 | 189 | 'oauth_version' => '1.0', |
| 190 | - 'oauth_consumer_key' => isset($options['client']) ? $options['client']->getId() : $this->client->getId(), |
|
| 190 | + 'oauth_consumer_key' => isset($options['client']) ? $options['client']->getId() : $this->client->getId(), |
|
| 191 | 191 | 'oauth_signature_method' => isset($options['signer']) ? $options['signer']->getMethod() : $this->signer->getMethod(), |
| 192 | 192 | 'oauth_nonce' => utils\Random::string(6, utils\str\Character::CHARS_BASE64, utils\Random::STRENGTH_NONE), |
| 193 | 193 | 'oauth_timestamp' => time(), |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $params[$key] = $key.'="'.rawurlencode($value).'"'; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - return $request->withHeader('Authorization', 'OAuth ' . implode(', ', $params)); |
|
| 254 | + return $request->withHeader('Authorization', 'OAuth '.implode(', ', $params)); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | /** |