Passed
Push — main ( 2c74b5...627173 )
by smiley
02:17
created
src/NPR/NPROne.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
 	protected function getRequestTarget(string $uri):string{
57 57
 		$parsedURL = parse_url($uri);
58 58
 
59
-		if(!isset($parsedURL['path'])){
59
+		if (!isset($parsedURL['path'])) {
60 60
 			throw new ProviderException('invalid path'); // @codeCoverageIgnore
61 61
 		}
62 62
 
63 63
 		// for some reason we were given a host name
64
-		if(isset($parsedURL['host'])){
64
+		if (isset($parsedURL['host'])) {
65 65
 
66 66
 			// back out if it doesn't match
67
-			if(strpos($parsedURL['host'], '.api.npr.org') === false){
67
+			if (strpos($parsedURL['host'], '.api.npr.org') === false) {
68 68
 				throw new ProviderException('given host does not match provider host'); // @codeCoverageIgnore
69 69
 			}
70 70
 
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
 	public function sendRequest(RequestInterface $request):ResponseInterface{
83 83
 
84 84
 		// get authorization only if we request the provider API
85
-		if(strpos((string)$request->getUri(), '.api.npr.org') !== false){
85
+		if (strpos((string)$request->getUri(), '.api.npr.org') !== false) {
86 86
 			$token = $this->storage->getAccessToken($this->serviceName);
87 87
 
88 88
 			// attempt to refresh an expired token
89
-			if(
89
+			if (
90 90
 				$this->options->tokenAutoRefresh
91 91
 				&& ($token->isExpired() || $token->expires === $token::EOL_UNKNOWN)
92
-			){
92
+			) {
93 93
 				$token = $this->refreshAccessToken($token); // @codeCoverageIgnore
94 94
 			}
95 95
 
Please login to merge, or discard this patch.