@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | { |
| 41 | 41 | if ($cycle == 'monthly') { |
| 42 | 42 | return Carbon::now()->startOfMonth(); |
| 43 | - }else if($cycle == 'weekly') { |
|
| 43 | + } else if($cycle == 'weekly') { |
|
| 44 | 44 | return Carbon::now()->startOfWeek(); |
| 45 | - }else if($cycle == 'daily') { |
|
| 45 | + } else if($cycle == 'daily') { |
|
| 46 | 46 | return Carbon::now()->startOfDay(); |
| 47 | 47 | } else { |
| 48 | 48 | Log::error('Duty has an invalid cycle name. Must use monthly, weekly or daily'); |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | if ($cycle == 'monthly') { |
| 56 | 56 | return $date->addMonth(); |
| 57 | - }else if($cycle == 'weekly') { |
|
| 57 | + } else if($cycle == 'weekly') { |
|
| 58 | 58 | return $date->addWeek(); |
| 59 | - }else if($cycle == 'daily') { |
|
| 59 | + } else if($cycle == 'daily') { |
|
| 60 | 60 | return $date->addDay(); |
| 61 | 61 | } else { |
| 62 | 62 | Log::error('Duty has an invalid cycle name. Must use monthly, weekly or daily'); |
@@ -40,8 +40,9 @@ |
||
| 40 | 40 | |
| 41 | 41 | private static function encryptFileContents($file, $encrypt) |
| 42 | 42 | { |
| 43 | - if ($encrypt) |
|
| 44 | - return encrypt(File::get($file)); |
|
| 43 | + if ($encrypt) { |
|
| 44 | + return encrypt(File::get($file)); |
|
| 45 | + } |
|
| 45 | 46 | return File::get($file); |
| 46 | 47 | } |
| 47 | 48 | } |
@@ -51,7 +51,9 @@ |
||
| 51 | 51 | $trainingUser = TrainingUser::with('training')->findOrFail($trainingID); |
| 52 | 52 | $this->authorize('show_user', $user); |
| 53 | 53 | |
| 54 | - if (isset($trainingUser->completed_date)) return redirect()->action('UserController@show', $user->id); |
|
| 54 | + if (isset($trainingUser->completed_date)) { |
|
| 55 | + return redirect()->action('UserController@show', $user->id); |
|
| 56 | + } |
|
| 55 | 57 | return view('traininguser.show', compact('trainingUser', 'user')); |
| 56 | 58 | } |
| 57 | 59 | |