@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | protected function getAuthUrl(): string |
| 20 | 20 | { |
| 21 | - return $this->buildAuthUrlFromBase('https://www.facebook.com/' . $this->version . '/dialog/oauth'); |
|
| 21 | + return $this->buildAuthUrlFromBase('https://www.facebook.com/'.$this->version.'/dialog/oauth'); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | protected function getTokenUrl(): string |
| 25 | 25 | { |
| 26 | - return $this->graphUrl . '/oauth/access_token'; |
|
| 26 | + return $this->graphUrl.'/oauth/access_token'; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | protected function getUserByToken(string $token, ?array $query = []): array |
| 56 | 56 | { |
| 57 | 57 | $appSecretProof = hash_hmac('sha256', $token, $this->getConfig()->get('client_secret')); |
| 58 | - $endpoint = $this->graphUrl . '/' . $this->version . '/me?access_token=' . $token . '&appsecret_proof=' . $appSecretProof . '&fields=' . |
|
| 58 | + $endpoint = $this->graphUrl.'/'.$this->version.'/me?access_token='.$token.'&appsecret_proof='.$appSecretProof.'&fields='. |
|
| 59 | 59 | implode(',', $this->fields); |
| 60 | 60 | |
| 61 | 61 | $response = $this->getHttpClient()->get( |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | protected function mapUserToObject(array $user): User |
| 74 | 74 | { |
| 75 | 75 | $userId = $user['id'] ?? null; |
| 76 | - $avatarUrl = $this->graphUrl . '/' . $this->version . '/' . $userId . '/picture'; |
|
| 76 | + $avatarUrl = $this->graphUrl.'/'.$this->version.'/'.$userId.'/picture'; |
|
| 77 | 77 | |
| 78 | 78 | $firstName = $user['first_name'] ?? null; |
| 79 | 79 | $lastName = $user['last_name'] ?? null; |
@@ -82,10 +82,10 @@ discard block |
||
| 82 | 82 | [ |
| 83 | 83 | 'id' => $user['id'] ?? null, |
| 84 | 84 | 'nickname' => null, |
| 85 | - 'name' => $firstName . ' ' . $lastName, |
|
| 85 | + 'name' => $firstName.' '.$lastName, |
|
| 86 | 86 | 'email' => $user['email'] ?? null, |
| 87 | - 'avatar' => $userId ? $avatarUrl . '?type=normal' : null, |
|
| 88 | - 'avatar_original' => $userId ? $avatarUrl . '?width=1920' : null, |
|
| 87 | + 'avatar' => $userId ? $avatarUrl.'?type=normal' : null, |
|
| 88 | + 'avatar_original' => $userId ? $avatarUrl.'?width=1920' : null, |
|
| 89 | 89 | ] |
| 90 | 90 | ); |
| 91 | 91 | } |
@@ -14,6 +14,6 @@ |
||
| 14 | 14 | { |
| 15 | 15 | parent::__construct($message, -1); |
| 16 | 16 | |
| 17 | - $this->body = (array) $body; |
|
| 17 | + $this->body = (array)$body; |
|
| 18 | 18 | } |
| 19 | 19 | } |