@@ -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 | { |
@@ -1,8 +1,8 @@ |
||
| 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 | |
| 7 | 7 | namespace Laztopaz\EmojiRestfulAPI; |
| 8 | 8 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | foreach ($emojis as $key => &$value) { |
| 270 | 270 | $value['created_by'] = $value['created_by']['firstname'].' '.$value['created_by']['lastname']; |
| 271 | 271 | $value['category'] = $value['category']['category_name']; |
| 272 | - $value['keywords'] = array_map(function ($key) { return $key['keyword_name']; }, $value['keywords']); |
|
| 272 | + $value['keywords'] = array_map(function($key) { return $key['keyword_name']; }, $value['keywords']); |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | return $emojis; |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | return ['message' => 'All fields must be supplied']; |
| 345 | 345 | } else { // Check whether the field supplied by the user is what we expect from them |
| 346 | 346 | foreach ($suppliedFields as $key => $value) { |
| 347 | - if (! in_array($key, array_merge($expectedFields,['created_at', 'updated_at', 'created_by']))) { |
|
| 347 | + if (!in_array($key, array_merge($expectedFields, ['created_at', 'updated_at', 'created_by']))) { |
|
| 348 | 348 | $counter++; |
| 349 | 349 | } |
| 350 | 350 | } |
@@ -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 Dotenv\Dotenv; |
@@ -48,15 +48,15 @@ discard block |
||
| 48 | 48 | $this->capsule->bootEloquent(); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * Load Dotenv to grant getenv() access to |
|
| 53 | - * environment variables in .env file. |
|
| 54 | - */ |
|
| 55 | - public static function loadEnv() |
|
| 56 | - { |
|
| 57 | - if (! getenv('APP_ENV')) { |
|
| 58 | - $dotenv = new Dotenv(__DIR__.'/../../'); |
|
| 59 | - $dotenv->load(); |
|
| 60 | - } |
|
| 61 | - } |
|
| 51 | + /** |
|
| 52 | + * Load Dotenv to grant getenv() access to |
|
| 53 | + * environment variables in .env file. |
|
| 54 | + */ |
|
| 55 | + public static function loadEnv() |
|
| 56 | + { |
|
| 57 | + if (! getenv('APP_ENV')) { |
|
| 58 | + $dotenv = new Dotenv(__DIR__.'/../../'); |
|
| 59 | + $dotenv->load(); |
|
| 60 | + } |
|
| 61 | + } |
|
| 62 | 62 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | public static function loadEnv() |
| 56 | 56 | { |
| 57 | - if (! getenv('APP_ENV')) { |
|
| 57 | + if (!getenv('APP_ENV')) { |
|
| 58 | 58 | $dotenv = new Dotenv(__DIR__.'/../../'); |
| 59 | 59 | $dotenv->load(); |
| 60 | 60 | } |