File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,7 @@ protected function getUserByToken($token)
3939 {
4040 $ response = $ this ->getHttpClient ()->get (
4141 'https://api.pinterest.com/v1/me/ ' ,
42- [
43- 'headers ' => [
44- 'Authorization ' => 'Bearer ' .$ token ,
45- ],
46- ]
42+ ['headers ' => ['Authorization ' => 'Bearer ' .$ token ]]
4743 );
4844 $ contents = $ response ->getBody ()->getContents ();
4945
@@ -57,7 +53,7 @@ protected function mapUserToObject(array $user)
5753 {
5854 preg_match ('#https://www.pinterest.com/(.+?)/# ' , $ user ['data ' ]['url ' ], $ matches );
5955 $ nickname = $ matches [1 ];
60-
56+
6157 return (new User ())->setRaw ($ user )->map (
6258 [
6359 'id ' => $ user ['data ' ]['id ' ],
@@ -73,10 +69,7 @@ protected function mapUserToObject(array $user)
7369 protected function getTokenFields ($ code )
7470 {
7571 return array_merge (
76- parent ::getTokenFields ($ code ),
77- [
78- 'grant_type ' => 'authorization_code ' ,
79- ]
72+ parent ::getTokenFields ($ code ), ['grant_type ' => 'authorization_code ' ]
8073 );
8174 }
8275}
You can’t perform that action at this time.
0 commit comments