We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Illuminate\Support\Facades\Mail; |
9 | 9 | use DoeSangue\Models\Donor; |
10 | 10 | use DoeSangue\Models\Campaign; |
11 | -use DoeSangue\Models\User; |
|
12 | 11 | use Carbon\Carbon; |
13 | 12 | use Tymon\JWTAuth\Facades\JWTAuth; |
14 | 13 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | return [ |
27 | 27 | 'title' => 'required|string|unique:campaigns', |
28 | 28 | 'expires' => 'required|date|after:created_at', |
29 | - // 'id_user' => 'required|integer:exists:users', |
|
29 | + // 'id_user' => 'required|integer:exists:users', |
|
30 | 30 | ]; |
31 | 31 | } |
32 | 32 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | $donor = Donor::find($id); |
27 | 27 | |
28 | - if (! $donor) { |
|
28 | + if (!$donor) { |
|
29 | 29 | return response()->json( |
30 | 30 | [ |
31 | 31 | 'error_code' => 404, |
@@ -80,8 +80,8 @@ |
||
80 | 80 | $user = JWTAuth::parsetToken()->authenticate(); |
81 | 81 | |
82 | 82 | // If the token is invalid |
83 | - if (! $user) { |
|
84 | - return response()->json(['invalid_user'], 401); |
|
83 | + if (!$user) { |
|
84 | + return response()->json([ 'invalid_user' ], 401); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | return response()->json([ |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @var string |
14 | 14 | */ |
15 | - // protected $signature = 'make:model'; |
|
15 | + // protected $signature = 'make:model'; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * The console command description. |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | parent::__construct(); |
48 | 48 | } |
49 | - */ |
|
49 | + */ |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Execute the console command. |
@@ -57,5 +57,5 @@ discard block |
||
57 | 57 | { |
58 | 58 | // |
59 | 59 | } |
60 | - */ |
|
60 | + */ |
|
61 | 61 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | $name = str_replace_first($this->rootNamespace(), '', $name); |
28 | 28 | |
29 | - return $this->laravel['path'].'/Models/'.str_replace('\\', '/', $name).'.php'; |
|
29 | + return $this->laravel[ 'path' ].'/Models/'.str_replace('\\', '/', $name).'.php'; |
|
30 | 30 | } |
31 | 31 | /** |
32 | 32 | * Get the root namespace for the class. |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | protected function rootNamespace() |
36 | 36 | { |
37 | - return $this->laravel->getNamespace() . 'Models'; |
|
37 | + return $this->laravel->getNamespace().'Models'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -18,9 +18,9 @@ |
||
18 | 18 | |
19 | 19 | // Extend the Validator class. |
20 | 20 | // To check the user age (minimum: 16) |
21 | - Validator::extend('olderThan', function ($attributes, $value, $parameters) |
|
21 | + Validator::extend('olderThan', function($attributes, $value, $parameters) |
|
22 | 22 | { |
23 | - $minAge = ( ! empty($parameters)) ? (int) $parameters[0] : 16; |
|
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 | } |