Completed
Pull Request — master (#66)
by Patrick
01:35
created
api/v1/class.Processor.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
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
     }
@@ -192,20 +192,20 @@  discard block
 block discarded – undo
192 192
             $tmp = $dataTable->read();
193 193
             foreach($tmp as $role)
194 194
             {
195
-               $roles[$role['short_name']] = $role;
195
+                $roles[$role['short_name']] = $role;
196 196
             }
197 197
         }
198 198
         if(isset($entry['volunteer']))
199 199
         {
200
-          unset($entry['volunteer']);
200
+            unset($entry['volunteer']);
201 201
         }
202 202
         if(isset($entry['why']))
203 203
         {
204
-          unset($entry['why']);
204
+            unset($entry['why']);
205 205
         }
206 206
         if(isset($entry['whyClass']))
207 207
         {
208
-          unset($entry['whyClass']);
208
+            unset($entry['whyClass']);
209 209
         }
210 210
         $shift = new \VolunteerShift(false, $entry);
211 211
         $entry['isAdmin'] = $this->isAdminForShift($entry, $this->user);
Please login to merge, or discard this patch.
api/v1/class.ShiftAPI.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected function canUpdate($request, $entity)
34 34
     {
35
- 	if($this->isVolunteerAdmin($request))
35
+        if($this->isVolunteerAdmin($request))
36 36
         {
37 37
             return true;
38 38
         }
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
         }
53 53
         if(!isset($obj['departmentID']))
54 54
         {
55
-             return false;
55
+                return false;
56 56
         }
57 57
         if(isset($obj['unbounded']) && $obj['unbounded'])
58 58
         {
59 59
             if(!isset($obj['minShifts']) || $obj['minShifts'] === 0 || $obj['minShifts'] === '')
60 60
             {
61
-                 $obj['minShifts'] = '1';
61
+                    $obj['minShifts'] = '1';
62 62
             }
63 63
         }
64 64
         return $this->isUserDepartmentLead($obj['departmentID'], $this->user);
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
             $ret = $dataTable->update($filter, $entArray[$i]);
160 160
             if($ret === false)
161 161
             {
162
-               $myRet = false;
163
-               array_push($errors, $array[$i]);
162
+                $myRet = false;
163
+                array_push($errors, $array[$i]);
164 164
             }
165 165
         }
166 166
         if($myRet)
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         $entity = $this->processShift($entity, $request);
266 266
         if(isset($entity['minShifts']) && $entity['minShifts'] > 0)
267 267
         {
268
-          $shift->makeCopy($dataTable);
268
+            $shift->makeCopy($dataTable);
269 269
         }
270 270
         if(isset($entity['overlap']) && $entity['overlap'])
271 271
         {
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
         $entity['status'] = 'unfilled';
332 332
         if(isset($entity['needEEApproval']))
333 333
         {
334
-          unset($entity['needEEApproval']);
334
+            unset($entity['needEEApproval']);
335 335
         }
336 336
         return $response->withJSON($dataTable->update($filter, $entity));
337 337
     }
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
         $entity['status'] = 'unfilled';
529 529
         if(isset($entity['needEEApproval']))
530 530
         {
531
-          unset($entity['needEEApproval']);
531
+            unset($entity['needEEApproval']);
532 532
         }
533 533
         $ret = $dataTable->update($filter, $entity);
534 534
         if($ret)
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
         $entity['status'] = 'unfilled';
564 564
         if(isset($entity['needEEApproval']))
565 565
         {
566
-          unset($entity['needEEApproval']);
566
+            unset($entity['needEEApproval']);
567 567
         }
568 568
         return $response->withJSON($dataTable->update($filter, $entity));
569 569
     }
Please login to merge, or discard this patch.