Cosmetics

This commit is contained in:
Nabeel Shahzad 2018-08-20 09:48:39 -05:00
parent 89baf34824
commit 66a9b361cb
3 changed files with 8 additions and 7 deletions

View File

@ -25,7 +25,7 @@ use Laratrust\Traits\LaratrustUserTrait;
* @property \Carbon\Carbon updated_at
* @property Rank rank
* @property Journal journal
* @property string pilot_id
* @property int rank_id
* @property int state
* @property bool opt_in
* @mixin \Illuminate\Notifications\Notifiable
@ -137,7 +137,7 @@ class User extends Authenticatable
}
return new File([
'path' => $this->attributes['avatar']
'path' => $this->attributes['avatar']
]);
}

View File

@ -12,10 +12,13 @@ use App\Cron\Nightly\PilotLeave;
use App\Cron\Nightly\RecalculateBalances;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
/**
* All of the hooks for the cron jobs
* @package App\Providers
*/
class CronServiceProvider extends ServiceProvider
{
protected $listen = [
# Cron hooks
CronNightly::class => [
ApplyExpenses::class,
RecalculateBalances::class,
@ -31,6 +34,4 @@ class CronServiceProvider extends ServiceProvider
\App\Cron\Monthly\ApplyExpenses::class
],
];
protected $subscribe = [];
}

View File

@ -199,9 +199,9 @@ class UserService extends Service
foreach ($ranks as $rank) {
if ($rank->hours > $pilot_hours->hours) {
break;
} else {
$user->rank_id = $rank->id;
}
$user->rank_id = $rank->id;
}
// Only trigger the event/update if there's been a change