@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /** |
12 | 12 | * {@inheritdoc} |
13 | 13 | */ |
14 | - protected $scopes = ['read_public']; |
|
14 | + protected $scopes = [ 'read_public' ]; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * {@inheritdoc} |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $response = $this->getHttpClient()->get( |
41 | 41 | 'https://api.pinterest.com/v1/me/', |
42 | - ['headers' => ['Authorization' => 'Bearer '.$token]] |
|
42 | + [ 'headers' => [ 'Authorization' => 'Bearer '.$token ] ] |
|
43 | 43 | ); |
44 | 44 | $contents = $response->getBody()->getContents(); |
45 | 45 | |
@@ -51,14 +51,14 @@ discard block |
||
51 | 51 | */ |
52 | 52 | protected function mapUserToObject(array $user) |
53 | 53 | { |
54 | - preg_match('#https://www.pinterest.com/(.+?)/#', $user['data']['url'], $matches); |
|
55 | - $nickname = $matches[1]; |
|
54 | + preg_match('#https://www.pinterest.com/(.+?)/#', $user[ 'data' ][ 'url' ], $matches); |
|
55 | + $nickname = $matches[ 1 ]; |
|
56 | 56 | |
57 | 57 | return (new User())->setRaw($user)->map( |
58 | 58 | [ |
59 | - 'id' => $user['data']['id'], |
|
59 | + 'id' => $user[ 'data' ][ 'id' ], |
|
60 | 60 | 'nickname' => $nickname, |
61 | - 'name' => $user['data']['first_name'].' '.$user['data']['last_name'], |
|
61 | + 'name' => $user[ 'data' ][ 'first_name' ].' '.$user[ 'data' ][ 'last_name' ], |
|
62 | 62 | ] |
63 | 63 | ); |
64 | 64 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | protected function getTokenFields($code) |
70 | 70 | { |
71 | 71 | return array_merge( |
72 | - parent::getTokenFields($code), ['grant_type' => 'authorization_code'] |
|
72 | + parent::getTokenFields($code), [ 'grant_type' => 'authorization_code' ] |
|
73 | 73 | ); |
74 | 74 | } |
75 | 75 | } |