@@ -103,7 +103,7 @@ |
||
103 | 103 | |
104 | 104 | |
105 | 105 | /** |
106 | - * @param $calculatedDays |
|
106 | + * @param integer $calculatedDays |
|
107 | 107 | * @param $user |
108 | 108 | * @param $builtUser |
109 | 109 | */ |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | private function getDueTraining() |
34 | 34 | { |
35 | 35 | |
36 | - return Training::with(['users', 'assignedUsers' => function ($query) { |
|
36 | + return Training::with(['users', 'assignedUsers' => function($query) { |
|
37 | 37 | //filter the assignedusers we get back |
38 | 38 | $query->ActiveUsers() |
39 | 39 | ->whereNull('completed_date') |
40 | 40 | ->where('due_date', '<=', Carbon::now()); |
41 | 41 | }]) |
42 | - ->whereHas('assignedUsers', function ($q) { |
|
42 | + ->whereHas('assignedUsers', function($q) { |
|
43 | 43 | //filter the training we get. |
44 | 44 | $q->ActiveUsers() |
45 | 45 | ->whereNull('completed_date') |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | */ |
54 | 54 | private function getExpiringVisits() |
55 | 55 | { |
56 | - return User::with(['visits' => function ($query) { |
|
56 | + return User::with(['visits' => function($query) { |
|
57 | 57 | $query->whereBetween('expiration_date', [Carbon::now(), Carbon::now()->addWeek()]); |
58 | - }])->whereHas('visits', function ($q) { |
|
58 | + }])->whereHas('visits', function($q) { |
|
59 | 59 | $q->whereBetween('expiration_date', [Carbon::now(), Carbon::now()->addWeek()]); |
60 | 60 | })->Active()->get(); |
61 | 61 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $years = 5; |
91 | 91 | } else if ($user->access_level == 'S' || $user->clearance == 'S') { |
92 | 92 | $years = 10; |
93 | - } else if($user->clearance = 'TS') { |
|
93 | + } else if ($user->clearance = 'TS') { |
|
94 | 94 | $years = 5; |
95 | 95 | } |
96 | 96 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * Create a new message instance. |
18 | 18 | * |
19 | - * @return void |
|
19 | + * @return Mailable |
|
20 | 20 | */ |
21 | 21 | public function __construct(News $news) |
22 | 22 | { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Build the message. |
28 | 28 | * |
29 | - * @return Illuminate\Mail\Mailable |
|
29 | + * @return SendNewsEmail |
|
30 | 30 | */ |
31 | 31 | public function build() |
32 | 32 | { |
@@ -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 | /** |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @param $user |
63 | - * @param $ignoreList |
|
63 | + * @param string[] $ignoreList |
|
64 | 64 | * @param $log |
65 | 65 | */ |
66 | 66 | private function buildLogComment($user, $ignoreList, $log) |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | public function boot() |
18 | 18 | { |
19 | 19 | // If the save() function is used on the User model, we will generate a new log note. |
20 | - User::updating(function ($user) { |
|
20 | + User::updating(function($user) { |
|
21 | 21 | $this->createUserLog($user); |
22 | 22 | }); |
23 | 23 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | $log['author_id'] = Auth::user() ? Auth::user()->id : 1; |
53 | 53 | $log['user_id'] = $user->id; |
54 | - if( !empty($log['comment']) ) { |
|
54 | + if (!empty($log['comment'])) { |
|
55 | 55 | Log::create($log); |
56 | 56 | } |
57 | 57 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function scopeActiveUsers($query) |
51 | 51 | { |
52 | - return $query->whereHas('user', function ($q) { |
|
52 | + return $query->whereHas('user', function($q) { |
|
53 | 53 | $q->where('status', 'active'); |
54 | 54 | }); |
55 | 55 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function handle() |
29 | 29 | { |
30 | - if(config('auth.guards.web.provider') == 'adldap') { |
|
30 | + if (config('auth.guards.web.provider') == 'adldap') { |
|
31 | 31 | $this->addMissingUsers(); |
32 | 32 | } |
33 | 33 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | Mail::send( |
60 | 60 | 'emails.training', |
61 | 61 | ['user' => $user, 'training' => $training, 'due_date' => $dueDate, 'trainingUser' => $trainingUser], |
62 | - function ($m) use ($user, $training) { |
|
62 | + function($m) use ($user, $training) { |
|
63 | 63 | $m->to($user->email, $user->userFullName)->subject($training->name . " was assigned to you."); |
64 | 64 | |
65 | 65 | //ATTACH FILES |
@@ -34,7 +34,7 @@ |
||
34 | 34 | /** |
35 | 35 | * @var array |
36 | 36 | */ |
37 | - protected $hidden = array('username','password'); |
|
37 | + protected $hidden = array('username', 'password'); |
|
38 | 38 | |
39 | 39 | public function supervisor() |
40 | 40 | { |
@@ -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; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | public function __construct(Duty $duty) |
15 | 15 | { |
16 | - parent::__construct($duty);; |
|
16 | + parent::__construct($duty); ; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function HTMLOutput() |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | public function emailOutput() |
38 | 38 | { |
39 | - $collection = $this->list->map(function ($value, $key) { |
|
39 | + $collection = $this->list->map(function($value, $key) { |
|
40 | 40 | return [ |
41 | 41 | 'users' => $value['group'], |
42 | 42 | 'date' => $value['date'] |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $newList = new Collection(); |
72 | 72 | $count = $this->list->count(); |
73 | 73 | |
74 | - for ($i = 0; $i < $count ; $i++) |
|
74 | + for ($i = 0; $i < $count; $i++) |
|
75 | 75 | { |
76 | 76 | $newList->push([ |
77 | 77 | 'date' => $dates[$i], |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | ->orderBy('date', 'ASC') |
93 | 93 | ->get(); |
94 | 94 | |
95 | - foreach($dutySwaps as $swap) |
|
95 | + foreach ($dutySwaps as $swap) |
|
96 | 96 | { |
97 | - foreach($this->list as $key => $entry) |
|
97 | + foreach ($this->list as $key => $entry) |
|
98 | 98 | { |
99 | 99 | if ($swap->date == $entry['date']) { |
100 | 100 | $this->list[$key] = [ |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $row = ''; |
117 | 117 | foreach ($entry['group'] as $user) { |
118 | - if(Gate::allows('view')) { |
|
118 | + if (Gate::allows('view')) { |
|
119 | 119 | $row .= "<a href='" . url('user', $user->id) . "'>" . $user->userFullName . "</a> & "; |
120 | 120 | } else { |
121 | 121 | $row .= $user->userFullName . " & "; |
@@ -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,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'); |