| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | * This has been adapted from the OAuth for PHP project. |
| 15 | 15 | * |
| 16 | 16 | * @static |
| 17 | 17 | * @param $input |
| 18 | - * @return array|mixed|string | |
| 18 | + * @return array|string | |
| 19 | 19 | */ |
| 20 | 20 | public static function urlencode_rfc3986($input) { |
| 21 | 21 | if (is_array($input)) { |
| 22 | 22 | return array_map(['Photonic_Plugin\Platforms\Authenticator', 'urlencode_rfc3986'], $input); |
| @@ -63,10 +63,9 @@ | ||
| 63 | 63 | $pairs[] = ('' === $value) ? "$key=0" : "$key=$value"; |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $string = implode('&', $pairs); | |
| 68 | - return $string; | |
| 67 | + return implode('&', $pairs); | |
| 69 | 68 | } |
| 70 | 69 | |
| 71 | 70 | /** |
| 72 | 71 | * Takes a token response from a request token call, then puts it in an appropriate array. |
| @@ -97,9 +96,9 @@ | ||
| 97 | 96 | * Fetches a token from authentication options |
| 98 | 97 | * |
| 99 | 98 | * @return array|null |
| 100 | 99 | */ |
| 101 | - public function get_cached_token() { | |
| 100 | + public function get_cached_token(): ?array { | |
| 102 | 101 | $transient_token = get_transient('photonic_' . $this->provider . '_token'); |
| 103 | 102 | $photonic_authentication = get_option('photonic_authentication'); |
| 104 | 103 | if (false !== $transient_token) { |
| 105 | 104 | return $transient_token; |