@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function __construct(News $news) |
| 22 | 22 | { |
| 23 | - $this->news = $news; |
|
| 23 | + $this->news = $news; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -25,11 +25,11 @@ |
||
| 25 | 25 | $newCollection = new Collection(); |
| 26 | 26 | |
| 27 | 27 | foreach ($this->list as $entry) { |
| 28 | - if(Gate::allows('view')) { |
|
| 29 | - $rowvalue = "<a href='" . url( 'user', $entry['user']->id ) . "'>". $entry['user']->userFullName ."</a>"; |
|
| 30 | - } else { |
|
| 31 | - $rowvalue = $entry['user']->userFullName; |
|
| 32 | - } |
|
| 28 | + if(Gate::allows('view')) { |
|
| 29 | + $rowvalue = "<a href='" . url( 'user', $entry['user']->id ) . "'>". $entry['user']->userFullName ."</a>"; |
|
| 30 | + } else { |
|
| 31 | + $rowvalue = $entry['user']->userFullName; |
|
| 32 | + } |
|
| 33 | 33 | $newCollection->push([ |
| 34 | 34 | 'row' => $rowvalue, |
| 35 | 35 | 'id' => $entry['user']->id, |
@@ -115,11 +115,11 @@ |
||
| 115 | 115 | { |
| 116 | 116 | $row = ''; |
| 117 | 117 | foreach ($entry['group'] as $user) { |
| 118 | - if(Gate::allows('view')) { |
|
| 119 | - $row .= "<a href='" . url('user', $user->id) . "'>" . $user->userFullName . "</a> & "; |
|
| 120 | - } else { |
|
| 121 | - $row .= $user->userFullName . " & "; |
|
| 122 | - } |
|
| 118 | + if(Gate::allows('view')) { |
|
| 119 | + $row .= "<a href='" . url('user', $user->id) . "'>" . $user->userFullName . "</a> & "; |
|
| 120 | + } else { |
|
| 121 | + $row .= $user->userFullName . " & "; |
|
| 122 | + } |
|
| 123 | 123 | } |
| 124 | 124 | $row = rtrim($row, '& '); |
| 125 | 125 | return $row; |
@@ -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 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | foreach ($newsToPublish as $news) { |
| 49 | 49 | $allUsers = User::skipSystem()->active()->get(); |
| 50 | 50 | foreach ($allUsers as $user) { |
| 51 | - Mail::to($user->email)->send(new SendNewsEmail($news)); |
|
| 51 | + Mail::to($user->email)->send(new SendNewsEmail($news)); |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | if ($news->send_email && $publishDate->eq(Carbon::now())) { |
| 131 | 131 | $allUsers = User::skipSystem()->active()->get(); |
| 132 | 132 | foreach ($allUsers as $user) { |
| 133 | - Mail::to($user->email)->send(new SendNewsEmail($news)); |
|
| 133 | + Mail::to($user->email)->send(new SendNewsEmail($news)); |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function store(TrainingUserRequest $request, User $user) |
| 31 | 31 | { |
| 32 | - $data = $request->all(); |
|
| 32 | + $data = $request->all(); |
|
| 33 | 33 | $data['author_id'] = Auth::user()->id; |
| 34 | 34 | $data['user_id'] = $user->id; |
| 35 | 35 | |
@@ -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 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | \SET\Http\Middleware\EncryptCookies::class, |
| 24 | 24 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
| 25 | 25 | \Illuminate\Session\Middleware\StartSession::class, |
| 26 | - \Krucas\Notification\Middleware\NotificationMiddleware::class, |
|
| 26 | + \Krucas\Notification\Middleware\NotificationMiddleware::class, |
|
| 27 | 27 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
| 28 | 28 | \SET\Http\Middleware\VerifyCsrfToken::class, |
| 29 | 29 | \Illuminate\Routing\Middleware\SubstituteBindings::class, |