We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -19,8 +19,8 @@ |
||
| 19 | 19 | // Extend the Validator class. |
| 20 | 20 | // To check the user age (minimum: 16) |
| 21 | 21 | Validator::extend( |
| 22 | - 'olderThan', function ($attributes, $value, $parameters) { |
|
| 23 | - $minAge = ( ! empty($parameters)) ? (int) $parameters[0] : 16; |
|
| 22 | + 'olderThan', function($attributes, $value, $parameters) { |
|
| 23 | + $minAge = (!empty($parameters)) ? (int) $parameters[ 0 ] : 16; |
|
| 24 | 24 | return \Carbon\Carbon::now()->diff(new \Carbon\Carbon($value))->y >= $minAge; |
| 25 | 25 | } |
| 26 | 26 | ); |
@@ -94,8 +94,8 @@ |
||
| 94 | 94 | $user = JWTAuth::parseToken()->authenticate(); |
| 95 | 95 | |
| 96 | 96 | // If the token is invalid |
| 97 | - if (! $user) { |
|
| 98 | - return response()->json(['invalid_user'], 401); |
|
| 97 | + if (!$user) { |
|
| 98 | + return response()->json([ 'invalid_user' ], 401); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | return response()->json( |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | ); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - // Notify error in not found |
|
| 102 | + // Notify error in not found |
|
| 103 | 103 | if (!$comment) { |
| 104 | 104 | return response()->json( |
| 105 | 105 | [ |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $camp = Campaign::find($campaign); |
| 33 | 33 | $comment = new Comment(); |
| 34 | 34 | $comment->id = str_random(); |
| 35 | - $comment->comment = $request['comment']; |
|
| 35 | + $comment->comment = $request[ 'comment' ]; |
|
| 36 | 36 | $comment->user_id = $user->id; |
| 37 | 37 | $comment->campaign_id = $camp->id; |
| 38 | 38 | // $comment->created_at = Carbon::now(); |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | ); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $comment->comment = $request['comment']; |
|
| 66 | + $comment->comment = $request[ 'comment' ]; |
|
| 67 | 67 | |
| 68 | - if (! $comment) { |
|
| 68 | + if (!$comment) { |
|
| 69 | 69 | return response()->json( |
| 70 | 70 | [ |
| 71 | 71 | 'error_code' => 404, |