@@ -484,7 +484,7 @@ |
||
484 | 484 | /** |
485 | 485 | * Put state to session storage and return it. |
486 | 486 | * |
487 | - * @return string|bool |
|
487 | + * @return false|string |
|
488 | 488 | */ |
489 | 489 | protected function makeState() |
490 | 490 | { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | */ |
101 | 101 | public function has($key) |
102 | 102 | { |
103 | - return (bool) $this->get($key); |
|
103 | + return (bool)$this->get($key); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -110,7 +110,7 @@ |
||
110 | 110 | /** |
111 | 111 | * 格式化token. |
112 | 112 | * |
113 | - * @param \Psr\Http\Message\StreamInterface|array $body |
|
113 | + * @param string $body |
|
114 | 114 | * |
115 | 115 | * @return \Overtrue\Socialite\AccessTokenInterface |
116 | 116 | */ |
@@ -230,6 +230,7 @@ |
||
230 | 230 | |
231 | 231 | /** |
232 | 232 | * {@inheritdoc}. |
233 | + * @param string $url |
|
233 | 234 | */ |
234 | 235 | protected function getUserInfoUrl($url, AccessTokenInterface $token) |
235 | 236 | { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ], |
101 | 101 | ]); |
102 | 102 | |
103 | - return (array) json_decode($response->getBody(), true); |
|
103 | + return (array)json_decode($response->getBody(), true); |
|
104 | 104 | } |
105 | 105 | /** |
106 | 106 | * Get the email address for the user. |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | ], |
120 | 120 | ]); |
121 | 121 | |
122 | - return (array) $this->arrayItem(json_decode($response->getBody(), true), 'elements.0.handle~'); |
|
122 | + return (array)$this->arrayItem(json_decode($response->getBody(), true), 'elements.0.handle~'); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -132,12 +132,12 @@ discard block |
||
132 | 132 | $lastName = $this->arrayItem($user, 'lastName.localized.'.$preferredLocale); |
133 | 133 | $name = $firstName.' '.$lastName; |
134 | 134 | |
135 | - $images = (array) $this->arrayItem($user, 'profilePicture.displayImage~.elements', []); |
|
136 | - $avatars = array_filter($images, function ($image) { |
|
135 | + $images = (array)$this->arrayItem($user, 'profilePicture.displayImage~.elements', []); |
|
136 | + $avatars = array_filter($images, function($image) { |
|
137 | 137 | return $image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] === 100; |
138 | 138 | }); |
139 | 139 | $avatar = array_shift($avatars); |
140 | - $originalAvatars = array_filter($images, function ($image) { |
|
140 | + $originalAvatars = array_filter($images, function($image) { |
|
141 | 141 | return $image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] === 800; |
142 | 142 | }); |
143 | 143 | $originalAvatar = array_shift($originalAvatars); |