@@ -108,7 +108,7 @@ |
||
| 108 | 108 | public function request(string $method, string $url, auth\interfaces\Token $token = null, array $options = []) : Promise |
| 109 | 109 | { |
| 110 | 110 | return $this->getHttpClient()->requestAsync($method, $url, array_merge_recursive($this->getDefaultRequestOptions($token), $options))->then( |
| 111 | - function (Response $response) use($token) { |
|
| 111 | + function(Response $response) use($token) { |
|
| 112 | 112 | return $this->onRequestSuccess($response, $token); |
| 113 | 113 | }, |
| 114 | 114 | function(\Exception $exception) use($token) { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | 'grant_type' => 'authorization_code', |
| 71 | 71 | 'code' => $code |
| 72 | 72 | ] |
| 73 | - ])->then(function (array $data) { |
|
| 73 | + ])->then(function(array $data) { |
|
| 74 | 74 | return $this->createToken($data); |
| 75 | 75 | }); |
| 76 | 76 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function identify(oauth2\Token $token) : Promise |
| 82 | 82 | { |
| 83 | - return $this->request('GET', $this->getIdentifyUrl(), $token)->then(function (array $data) use ($token) { |
|
| 83 | + return $this->request('GET', $this->getIdentifyUrl(), $token)->then(function(array $data) use ($token) { |
|
| 84 | 84 | return $this->createIdentity($token, $data); |
| 85 | 85 | }); |
| 86 | 86 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function identify(auth\Credentials $credentials) : Promise |
| 96 | 96 | { |
| 97 | - return $this->request('GET', $this->getIdentifyUrl(), $credentials)->then(function (array $data) use ($credentials) { |
|
| 97 | + return $this->request('GET', $this->getIdentifyUrl(), $credentials)->then(function(array $data) use ($credentials) { |
|
| 98 | 98 | return $this->createIdentity($credentials, $data); |
| 99 | 99 | }); |
| 100 | 100 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | { |
| 161 | 161 | return $this->getHttpClient() |
| 162 | 162 | ->requestAsync('POST', $url, array_merge_recursive($this->getDefaultRequestOptions($temporary), $options)) |
| 163 | - ->then(function (Response $response) use($temporary) { |
|
| 163 | + ->then(function(Response $response) use($temporary) { |
|
| 164 | 164 | |
| 165 | 165 | // We are assuming a form-encoded body here - for any Provider that does not return those in this format |
| 166 | 166 | // for handshakes and exchanges this will require refactoring. |
@@ -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 | } |