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
+2 -2
View File
@@ -25,7 +25,7 @@ use Laratrust\Traits\LaratrustUserTrait;
* @property \Carbon\Carbon updated_at * @property \Carbon\Carbon updated_at
* @property Rank rank * @property Rank rank
* @property Journal journal * @property Journal journal
* @property string pilot_id * @property int rank_id
* @property int state * @property int state
* @property bool opt_in * @property bool opt_in
* @mixin \Illuminate\Notifications\Notifiable * @mixin \Illuminate\Notifications\Notifiable
@@ -137,7 +137,7 @@ class User extends Authenticatable
} }
return new File([ return new File([
'path' => $this->attributes['avatar'] 'path' => $this->attributes['avatar']
]); ]);
} }
+4 -3
View File
@@ -12,10 +12,13 @@ use App\Cron\Nightly\PilotLeave;
use App\Cron\Nightly\RecalculateBalances; use App\Cron\Nightly\RecalculateBalances;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
/**
* All of the hooks for the cron jobs
* @package App\Providers
*/
class CronServiceProvider extends ServiceProvider class CronServiceProvider extends ServiceProvider
{ {
protected $listen = [ protected $listen = [
# Cron hooks
CronNightly::class => [ CronNightly::class => [
ApplyExpenses::class, ApplyExpenses::class,
RecalculateBalances::class, RecalculateBalances::class,
@@ -31,6 +34,4 @@ class CronServiceProvider extends ServiceProvider
\App\Cron\Monthly\ApplyExpenses::class \App\Cron\Monthly\ApplyExpenses::class
], ],
]; ];
protected $subscribe = [];
} }
+2 -2
View File
@@ -199,9 +199,9 @@ class UserService extends Service
foreach ($ranks as $rank) { foreach ($ranks as $rank) {
if ($rank->hours > $pilot_hours->hours) { if ($rank->hours > $pilot_hours->hours) {
break; break;
} else {
$user->rank_id = $rank->id;
} }
$user->rank_id = $rank->id;
} }
// Only trigger the event/update if there's been a change // Only trigger the event/update if there's been a change