Completed
Pull Request — master (#73)
by Patrick
01:36
created
api/v1/class.EventAPI.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     protected function canUpdate($request, $entity)
39 39
     {
40
- 	if($this->isVolunteerAdmin($request))
40
+        if($this->isVolunteerAdmin($request))
41 41
         {
42 42
             return true;
43 43
         }       
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             }
97 97
         }
98 98
         $shifts = $dataTable->read($filter, $odata->select, $odata->top,
99
-                                  $odata->skip, $odata->orderby);
99
+                                    $odata->skip, $odata->orderby);
100 100
         if($shifts === false)
101 101
         {
102 102
             $shifts = array();
Please login to merge, or discard this patch.
app/Schedules/class.GridSchedule.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -46,17 +46,17 @@  discard block
 block discarded – undo
46 46
         {
47 47
             for($j = 0; $j < $rowCount; $j++)
48 48
             {
49
-                 $cell = $sheat->getCellByColumnAndRow($i+2, $j+4);
50
-                 if($cell->isInMergeRange())
51
-                 {
52
-                      continue;
53
-                 }
54
-                 else
55
-                 {
56
-                     $style = $cell->getStyle();
57
-                     $style->getBorders()->getAllBorders()->setBorderStyle(false);
58
-                     $style->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTGRAY);
59
-                 }
49
+                    $cell = $sheat->getCellByColumnAndRow($i+2, $j+4);
50
+                    if($cell->isInMergeRange())
51
+                    {
52
+                        continue;
53
+                    }
54
+                    else
55
+                    {
56
+                        $style = $cell->getStyle();
57
+                        $style->getBorders()->getAllBorders()->setBorderStyle(false);
58
+                        $style->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTGRAY);
59
+                    }
60 60
             }
61 61
         }
62 62
     }
@@ -86,15 +86,15 @@  discard block
 block discarded – undo
86 86
             $shifts[$i]['length'] = $diff->h;
87 87
             if(!isset($roles[$shifts[$i]['roleID']]))
88 88
             {
89
-                 $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
90
-                 $roles2[$shifts[$i]['roleID']] = array();
89
+                    $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
90
+                    $roles2[$shifts[$i]['roleID']] = array();
91 91
             }
92 92
             else
93 93
             {
94
-                 if($roles[$shifts[$i]['roleID']] < $shifts[$i]['length'])
95
-                 {
96
-                     $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
97
-                 }
94
+                    if($roles[$shifts[$i]['roleID']] < $shifts[$i]['length'])
95
+                    {
96
+                        $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
97
+                    }
98 98
             }
99 99
             array_push($roles2[$shifts[$i]['roleID']], array('start'=>$start, 'end'=>$end));
100 100
         }
Please login to merge, or discard this patch.
api/v1/class.DepartmentAPI.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $filter = new \Data\Filter("departmentID eq '$deptId'");
78 78
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
79 79
         $roles = $dataTable->read($filter, $odata->select, $odata->top,
80
-                                  $odata->skip, $odata->orderby);
80
+                                    $odata->skip, $odata->orderby);
81 81
         if($roles === false)
82 82
         {
83 83
             $roles = array();
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             }
115 115
         }
116 116
         $shifts = $dataTable->read($filter, $odata->select, $odata->top,
117
-                                  $odata->skip, $odata->orderby);
117
+                                    $odata->skip, $odata->orderby);
118 118
         if($shifts === false)
119 119
         {
120 120
             $shifts = array();
Please login to merge, or discard this patch.
groupSignup.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 if(!isset($_GET['id']))
11 11
 {
12
-  $page->body .= 'Error! Missing Group ID. You must have followed a bad link!';
13
-  $page->printPage();
14
-  return;
12
+    $page->body .= 'Error! Missing Group ID. You must have followed a bad link!';
13
+    $page->printPage();
14
+    return;
15 15
 }
16 16
 
17 17
 $groupID = $_GET['id'];
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 $shifts = $dataTable->read($filter);
21 21
 if(empty($shifts))
22 22
 {
23
-  $page->body .= 'Error! Could not locate shifts. You must have followed an old link!';
24
-  $page->printPage();
25
-  return;
23
+    $page->body .= 'Error! Could not locate shifts. You must have followed an old link!';
24
+    $page->printPage();
25
+    return;
26 26
 }
27 27
 
28 28
 $filled = array();
@@ -32,35 +32,35 @@  discard block
 block discarded – undo
32 32
 $count = count($shifts);
33 33
 for($i = 0; $i < $count; $i++)
34 34
 {
35
-  $shifts[$i] = new \VolunteerShift(false, $shifts[$i]);
36
-  if($shifts[$i]->status === 'filled' || $shifts[$i]->status === 'pending')
37
-  {
38
-      array_push($filled, $shifts[$i]);
39
-      if($page->user && $shifts[$i]->participant === $page->user->uid)
40
-      {
41
-          $alreadySignedUp = true;
42
-      }
43
-  }
44
-  else
45
-  {
46
-      array_push($available, $shifts[$i]);
47
-  }
35
+    $shifts[$i] = new \VolunteerShift(false, $shifts[$i]);
36
+    if($shifts[$i]->status === 'filled' || $shifts[$i]->status === 'pending')
37
+    {
38
+        array_push($filled, $shifts[$i]);
39
+        if($page->user && $shifts[$i]->participant === $page->user->uid)
40
+        {
41
+            $alreadySignedUp = true;
42
+        }
43
+    }
44
+    else
45
+    {
46
+        array_push($available, $shifts[$i]);
47
+    }
48 48
 }
49 49
 $page->body .= '<div class="row"><h3>Filled Shifts</h3></div><div class="row"><table class="table"><tr><th>Role</th><th>Participant</th></tr>';
50 50
 foreach($filled as $shift)
51 51
 {
52
-  $page->body.= '<tr><td>'.$shift->role->display_name.'</td><td>'.$shift->webParticipantName.'</td></tr>';
52
+    $page->body.= '<tr><td>'.$shift->role->display_name.'</td><td>'.$shift->webParticipantName.'</td></tr>';
53 53
 }
54 54
 $page->body .= '</table></div>';
55 55
 $page->body .= '<div class="row"><h3>Unfilled Shifts</h3></div><div class="row"><table class="table"><tr><th>Role</th><th>Sign Up</th></tr>';
56 56
 foreach($available as $shift)
57 57
 {
58
-  $cell = '<i>You already have a shift!</i>';
59
-  if($alreadySignedUp === false)
60
-  {
58
+    $cell = '<i>You already have a shift!</i>';
59
+    if($alreadySignedUp === false)
60
+    {
61 61
     $cell = '<button type="button" class="btn btn-primary" onClick="signUp(\''.$shift->_id.'\');">Sign Up</button>';
62
-  } 
63
-  $page->body.= '<tr><td>'.$shift->role->display_name.'</td><td>'.$cell.'</td></tr>';
62
+    } 
63
+    $page->body.= '<tr><td>'.$shift->role->display_name.'</td><td>'.$cell.'</td></tr>';
64 64
 }
65 65
 $page->body .= '</table></div>';
66 66
 $page->printPage();
Please login to merge, or discard this patch.
app/class.VolunteerShift.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 
114 114
     public function isFilled()
115 115
     {
116
-         return isset($this->dbData['status']) && ($this->dbData['status'] === 'pending' || $this->dbData['status'] === 'filled' || $this->dbData['status'] === 'groupPending');
116
+            return isset($this->dbData['status']) && ($this->dbData['status'] === 'pending' || $this->dbData['status'] === 'filled' || $this->dbData['status'] === 'groupPending');
117 117
     }
118 118
 
119 119
     public function findOverlaps($uid, $shortCircuit = false)
Please login to merge, or discard this patch.
_admin/class.VolunteerAdminPage.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             $this->isLead = $this->user->isInGroupNamed('Leads');
37 37
             if($this->isLead)
38 38
             {
39
-                 $this->is_admin = true;
39
+                    $this->is_admin = true;
40 40
             }
41 41
             else
42 42
             {
Please login to merge, or discard this patch.
app/Emails/class.ShiftEmail.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@
 block discarded – undo
44 44
         $start = $this->shift->startTime->format('r');
45 45
         $end = $this->shift->endTime->format('r');
46 46
         $vars = array(
47
-          '{$firstName}' => $firstName,
48
-          '{$lastName}' => $lastName,
49
-          '{$paperName}' => $paperName,
50
-          '{$webName}' => $webName,
51
-          '{$department}' => $department,
52
-          '{$role}' => $role,
53
-          '{$event}' => $event,
54
-          '{$start}' => $start,
55
-          '{$end}' => $end
47
+            '{$firstName}' => $firstName,
48
+            '{$lastName}' => $lastName,
49
+            '{$paperName}' => $paperName,
50
+            '{$webName}' => $webName,
51
+            '{$department}' => $department,
52
+            '{$role}' => $role,
53
+            '{$event}' => $event,
54
+            '{$start}' => $start,
55
+            '{$end}' => $end
56 56
         );
57 57
         if(strpos($this->text, '{$newStart}') !== false || strpos($this->text, '{$newEnd}') !== false)
58 58
         {
Please login to merge, or discard this patch.
api/v1/class.ParticipantAPI.php 1 patch
Indentation   +4 added lines, -4 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
         }       
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
90 90
         $filter = $this->getFilterForPrimaryKey($uid);
91 91
         $areas = $dataTable->read($filter, $odata->select, $odata->top,
92
-                                  $odata->skip, $odata->orderby);
92
+                                    $odata->skip, $odata->orderby);
93 93
         if(empty($areas))
94 94
         {
95 95
             return $response->withStatus(404);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
161 161
         $filter = $this->getFilterForPrimaryKey($uid);
162 162
         $areas = $dataTable->read($filter, array('certs'), $odata->top,
163
-                                  $odata->skip, $odata->orderby);
163
+                                    $odata->skip, $odata->orderby);
164 164
         if(empty($areas))
165 165
         {
166 166
             return $response->withStatus(404);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $user = $users[0];
195 195
         if(!isset($user['certs']))
196 196
         {
197
-             $user['certs'] = array();
197
+                $user['certs'] = array();
198 198
         }
199 199
         $files = $request->getUploadedFiles();
200 200
         $file = $files['file'];
Please login to merge, or discard this patch.
app/Emails/class.CertificationEmail.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
         $certType = $this->additionalProps['certType'];
49 49
         $rejectReason = $this->additionalProps['reason'];
50 50
         $vars = array(
51
-          '{$firstName}' => $firstName,
52
-          '{$lastName}' => $lastName,
53
-          '{$paperName}' => $paperName,
54
-          '{$webName}' => $webName,
55
-          '{$certType}' => $certType,
56
-          '{$rejectReason}' => $rejectReason
51
+            '{$firstName}' => $firstName,
52
+            '{$lastName}' => $lastName,
53
+            '{$paperName}' => $paperName,
54
+            '{$webName}' => $webName,
55
+            '{$certType}' => $certType,
56
+            '{$rejectReason}' => $rejectReason
57 57
         );
58 58
         if($html === true)
59 59
         {
Please login to merge, or discard this patch.