@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @author Temitope Olotin <[email protected]> |
|
4 | - * @license <https://opensource.org/license/MIT> MIT |
|
5 | - */ |
|
3 | + * @author Temitope Olotin <[email protected]> |
|
4 | + * @license <https://opensource.org/license/MIT> MIT |
|
5 | + */ |
|
6 | 6 | namespace Laztopaz\EmojiRestfulAPI; |
7 | 7 | |
8 | 8 | use \Psr\Http\Message\ServerRequestInterface as Request; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $jwtoken = $request->getServerParams()['token']; |
249 | 249 | |
250 | 250 | try { |
251 | - if (isset($jwtoken)) { |
|
251 | + if (isset($jwtoken)) { |
|
252 | 252 | $secretKey = base64_decode(getenv('secret')); |
253 | 253 | |
254 | 254 | $jwt = json_decode($jwtoken, true); |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $userInfo = (array) $tokenInfo['dat']; |
262 | 262 | |
263 | - return $userInfo['id']; |
|
263 | + return $userInfo['id']; |
|
264 | 264 | |
265 | 265 | } |
266 | 266 |
@@ -232,7 +232,7 @@ |
||
232 | 232 | foreach ($emojis as $key => &$value) { |
233 | 233 | $value['created_by'] = $value['created_by']['firstname'].' '.$value['created_by']['lastname']; |
234 | 234 | $value['category'] = $value['category']['category_name']; |
235 | - $value['keywords'] = array_map(function ($key) { return $key['keyword_name']; }, $value['keywords']); |
|
235 | + $value['keywords'] = array_map(function($key) { return $key['keyword_name']; }, $value['keywords']); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | return $emojis; |
@@ -254,6 +254,8 @@ |
||
254 | 254 | |
255 | 255 | /** |
256 | 256 | * This method authenticate and return user id |
257 | + * @param Request $request |
|
258 | + * @param Response $response |
|
257 | 259 | */ |
258 | 260 | public function getCurrentUserId($request, $response) |
259 | 261 | { |