@@ -12,6 +12,9 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | protected abstract function isVolunteerAdmin($request); |
| 14 | 14 | |
| 15 | + /** |
|
| 16 | + * @param VolunteerProfile|null $user |
|
| 17 | + */ |
|
| 15 | 18 | public function canUserDoRole($user, $role) |
| 16 | 19 | { |
| 17 | 20 | static $certs = null; |
@@ -155,6 +158,9 @@ discard block |
||
| 155 | 158 | return !in_array($deptId, $privateDepts); |
| 156 | 159 | } |
| 157 | 160 | |
| 161 | + /** |
|
| 162 | + * @param VolunteerShift $shift |
|
| 163 | + */ |
|
| 158 | 164 | protected function doShiftTimeChecks($shift, $entry) |
| 159 | 165 | { |
| 160 | 166 | $now = new DateTime(); |
@@ -47,10 +47,10 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | for($i = 0; $i < $certCount; $i++) |
| 49 | 49 | { |
| 50 | - if($this->certCheck($requirements, $userCerts, $certs[$i]['certID'])) |
|
| 51 | - { |
|
| 52 | - return array('whyClass' => 'CERT', 'whyMsg' => 'Shift requires '.$certs[$i]['name'].' and you do not have that certification'); |
|
| 53 | - } |
|
| 50 | + if($this->certCheck($requirements, $userCerts, $certs[$i]['certID'])) |
|
| 51 | + { |
|
| 52 | + return array('whyClass' => 'CERT', 'whyMsg' => 'Shift requires '.$certs[$i]['name'].' and you do not have that certification'); |
|
| 53 | + } |
|
| 54 | 54 | } |
| 55 | 55 | return true; |
| 56 | 56 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $tmp = $dataTable->read(); |
| 189 | 189 | foreach($tmp as $role) |
| 190 | 190 | { |
| 191 | - $roles[$role['short_name']] = $role; |
|
| 191 | + $roles[$role['short_name']] = $role; |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | $shift = new \VolunteerShift(false, $entry); |