diff --git a/app/Console/Commands/UpdateMemberData.php b/app/Console/Commands/UpdateMemberData.php index d85f49104..a05464ac1 100644 --- a/app/Console/Commands/UpdateMemberData.php +++ b/app/Console/Commands/UpdateMemberData.php @@ -51,7 +51,7 @@ public function handle() $optionalUserIdFilter = $this->argument('user'); - if(!$optionalUserIdFilter) { + if (! $optionalUserIdFilter) { $users = User::query()->where('refresh_token', '!=', null)->get(); } else { $users = User::findOrFail($optionalUserIdFilter); @@ -62,7 +62,6 @@ public function handle() if (Carbon::parse($user->token_expires)->isPast()) { $refresh = $this->oauthHelper->refreshToken($user); - if (! $refresh) { diff --git a/app/Http/Controllers/API/StudentsController.php b/app/Http/Controllers/API/StudentsController.php index 0abc845f4..e14828a87 100644 --- a/app/Http/Controllers/API/StudentsController.php +++ b/app/Http/Controllers/API/StudentsController.php @@ -9,26 +9,26 @@ class StudentsController extends Controller { public function index() { - $data = []; + $data = []; $areas = Area::all(); - - foreach($areas as $area){ + + foreach ($areas as $area) { $data[$area->name] = []; $ratings = $area->ratings->whereNotNull('vatsim_rating'); - foreach($ratings as $rating){ + foreach ($ratings as $rating) { $data[$area->name][$rating->name] = []; $userIds = $rating->trainings->where('status', '>=', 1)->where('area_id', $area->id)->pluck('user.id'); - if($userIds->count()){ + if ($userIds->count()) { $data[$area->name][$rating->name] = $userIds->toArray(); } } } return response()->json(['data' => [ - $data + $data, ]], 200); } }