We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * Authenticate the user's personal channel... |
| 21 | 21 | */ |
| 22 | 22 | Broadcast::channel( |
| 23 | - 'App.User.*', function ($user, $userId) { |
|
| 23 | + 'App.User.*', function($user, $userId) { |
|
| 24 | 24 | return (int) $user->id === (int) $userId; |
| 25 | 25 | } |
| 26 | 26 | ); |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DoeSangue\Http\Controllers; |
| 4 | 4 | |
| 5 | -use Illuminate\Http\Request; |
|
| 6 | - |
|
| 7 | 5 | class HomeController extends Controller |
| 8 | 6 | { |
| 9 | 7 | /** |
@@ -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 | /** |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | parent::__construct(); |
| 49 | 49 | } |
| 50 | - */ |
|
| 50 | + */ |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Execute the console command. |
@@ -58,5 +58,5 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | // |
| 60 | 60 | } |
| 61 | - */ |
|
| 61 | + */ |
|
| 62 | 62 | } |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use DoeSangue\Http\Requests\CreateCampaignRequest; |
| 7 | 7 | use DoeSangue\Http\Controllers\Controller; |
| 8 | 8 | use Illuminate\Support\Facades\Mail; |
| 9 | -use DoeSangue\Models\Donor; |
|
| 10 | 9 | use DoeSangue\Models\Campaign; |
| 11 | 10 | use Carbon\Carbon; |
| 12 | 11 | use Tymon\JWTAuth\Facades\JWTAuth; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | $campaign = new Campaign(); |
| 34 | 34 | $campaign->title = $request[ 'title' ]; |
| 35 | - $campaign->description = $request['description']; |
|
| 35 | + $campaign->description = $request[ 'description' ]; |
|
| 36 | 36 | $campaign->expires = $request[ 'expires' ]; |
| 37 | 37 | // $campaign->user_id = $request[ 'user_id' ]; |
| 38 | 38 | // use auth guard instead of $request['user_id']. |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * Get all campaigns |
| 27 | 27 | * 20 queries per page |
| 28 | 28 | * |
| 29 | - * @return void |
|
| 29 | + * @return \Illuminate\Http\JsonResponse |
|
| 30 | 30 | */ |
| 31 | 31 | public function index() |
| 32 | 32 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * Create a new campaign |
| 40 | 40 | * |
| 41 | 41 | * @param CreateCampaignRequest $request |
| 42 | - * @return void |
|
| 42 | + * @return \Illuminate\Http\JsonResponse |
|
| 43 | 43 | */ |
| 44 | 44 | public function store(CreateCampaignRequest $request) |
| 45 | 45 | { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * Get all details of a campaign |
| 73 | 73 | * |
| 74 | 74 | * @param integer $id |
| 75 | - * @return void |
|
| 75 | + * @return \Illuminate\Http\JsonResponse |
|
| 76 | 76 | */ |
| 77 | 77 | public function show($id) |
| 78 | 78 | { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * |
| 110 | 110 | * @param UpdateCampaignRequest $request |
| 111 | 111 | * @param integer $id |
| 112 | - * @return void |
|
| 112 | + * @return \Illuminate\Http\JsonResponse |
|
| 113 | 113 | */ |
| 114 | 114 | public function update(UpdateCampaignRequest $request, $id) |
| 115 | 115 | { |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * Delete the campaign from platform. |
| 165 | 165 | * |
| 166 | 166 | * @param integer $id |
| 167 | - * @return void |
|
| 167 | + * @return \Illuminate\Http\JsonResponse |
|
| 168 | 168 | */ |
| 169 | 169 | public function destroy($id) |
| 170 | 170 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DoeSangue\Http\Controllers\API\V1; |
| 4 | 4 | |
| 5 | -use Illuminate\Http\Request; |
|
| 6 | 5 | use DoeSangue\Http\Controllers\Controller; |
| 7 | 6 | use DoeSangue\Models\Donor; |
| 8 | 7 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | /** |
| 17 | 17 | * Get all donors |
| 18 | 18 | * |
| 19 | - * @return void |
|
| 19 | + * @return \Illuminate\Http\JsonResponse |
|
| 20 | 20 | */ |
| 21 | 21 | public function index() |
| 22 | 22 | { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * Show details about the donors |
| 30 | 30 | * |
| 31 | 31 | * @param integer $id |
| 32 | - * @return void |
|
| 32 | + * @return \Illuminate\Http\JsonResponse |
|
| 33 | 33 | */ |
| 34 | 34 | public function show($id) |
| 35 | 35 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DoeSangue\Http\Controllers\API\V1; |
| 4 | 4 | |
| 5 | -use Illuminate\Http\Request; |
|
| 6 | 5 | use DoeSangue\Http\Controllers\Controller; |
| 7 | 6 | use DoeSangue\Repositories\Users; |
| 8 | 7 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | /** |
| 70 | 70 | * Returns the campaigns created by the user. |
| 71 | 71 | * |
| 72 | - * @return array relationship |
|
| 72 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany relationship |
|
| 73 | 73 | * @var array |
| 74 | 74 | */ |
| 75 | 75 | public function campaigns() |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | /** |
| 86 | 86 | * Returns the comments created by the user. |
| 87 | 87 | * |
| 88 | - * @return array relationship |
|
| 88 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany relationship |
|
| 89 | 89 | * @var array |
| 90 | 90 | */ |
| 91 | 91 | public function comments() |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function getFullNameAttribute($value) |
| 65 | 65 | { |
| 66 | - return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name); |
|
| 66 | + return ucfirst($this->first_name).' '.ucfirst($this->last_name); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -95,6 +95,6 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | public function getIsActiveAttribute() |
| 97 | 97 | { |
| 98 | - return $this->attributes['active'] == true; |
|
| 98 | + return $this->attributes[ 'active' ] == true; |
|
| 99 | 99 | } |
| 100 | 100 | } |
@@ -16,6 +16,9 @@ |
||
| 16 | 16 | return User::whereUsername($username)->get(); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | + /** |
|
| 20 | + * @return string |
|
| 21 | + */ |
|
| 19 | 22 | public function filterActive() |
| 20 | 23 | { |
| 21 | 24 | // |
@@ -47,24 +47,24 @@ discard block |
||
| 47 | 47 | public function render($request, Exception $exception) |
| 48 | 48 | { |
| 49 | 49 | // Validate 404 exceptions. |
| 50 | - if($exception instanceof NotFoundHttpException) { |
|
| 50 | + if ($exception instanceof NotFoundHttpException) { |
|
| 51 | 51 | return response()->json( |
| 52 | 52 | [ |
| 53 | 53 | 'error' => [ |
| 54 | 54 | 'description' => 'Invalid URI', |
| 55 | - 'messages' => [] |
|
| 55 | + 'messages' => [ ] |
|
| 56 | 56 | ] |
| 57 | 57 | ], 404 |
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // Method not allowed exception handler |
| 62 | - if($exception instanceof MethodNotAllowedHttpException) { |
|
| 62 | + if ($exception instanceof MethodNotAllowedHttpException) { |
|
| 63 | 63 | return response()->json( |
| 64 | 64 | [ |
| 65 | 65 | 'error' => [ |
| 66 | 66 | 'description' => 'Method Not Allowed', |
| 67 | - 'messages' => [] |
|
| 67 | + 'messages' => [ ] |
|
| 68 | 68 | ] |
| 69 | 69 | ], 405 |
| 70 | 70 | ); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | protected function unauthenticated($request, AuthenticationException $exception) |
| 85 | 85 | { |
| 86 | 86 | if ($request->expectsJson()) { |
| 87 | - return response()->json(['error' => 'Unauthenticated.'], 401); |
|
| 87 | + return response()->json([ 'error' => 'Unauthenticated.' ], 401); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return redirect()->guest('login'); |