@@ -58,11 +58,11 @@ |
||
| 58 | 58 | public function sendRequest(RequestInterface $request):ResponseInterface{ |
| 59 | 59 | |
| 60 | 60 | // get authorization only if we request the provider API |
| 61 | - if(\strpos((string)$request->getUri(), '.api.npr.org/') !== false){ // silly resource subdomains >.< |
|
| 61 | + if (\strpos((string)$request->getUri(), '.api.npr.org/') !== false) { // silly resource subdomains >.< |
|
| 62 | 62 | $token = $this->storage->getAccessToken($this->serviceName); |
| 63 | 63 | |
| 64 | 64 | // attempt to refresh an expired token |
| 65 | - if($this->options->tokenAutoRefresh && ($token->isExpired() || $token->expires === $token::EOL_UNKNOWN)){ |
|
| 65 | + if ($this->options->tokenAutoRefresh && ($token->isExpired() || $token->expires === $token::EOL_UNKNOWN)) { |
|
| 66 | 66 | $token = $this->refreshAccessToken($token); // @codeCoverageIgnore |
| 67 | 67 | } |
| 68 | 68 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * @link https://dev.npr.org/api/ |
| 19 | 19 | */ |
| 20 | -class NPROneEndpoints extends EndpointMap{ |
|
| 20 | +class NPROneEndpoints extends EndpointMap { |
|
| 21 | 21 | |
| 22 | 22 | protected $API_BASE = 'https://'; // i hate this so much |
| 23 | 23 | |