Completed
Push — FVSv2 ( 10d7ab...2b5aa4 )
by Patrick
01:37
created
api/v1/class.ParticipantAPI.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     protected function canUpdate($request, $entity)
37 37
     {
38
- 	if($this->isVolunteerAdmin($request))
38
+        if($this->isVolunteerAdmin($request))
39 39
         {
40 40
             return true;
41 41
         }       
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
84 84
         $filter = $this->getFilterForPrimaryKey($uid);
85 85
         $areas = $dataTable->read($filter, $odata->select, $odata->top,
86
-                                  $odata->skip, $odata->orderby);
86
+                                    $odata->skip, $odata->orderby);
87 87
         if(empty($areas))
88 88
         {
89 89
             return $response->withStatus(404);
Please login to merge, or discard this patch.
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.
_admin/class.VolunteerAdminPage.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             $this->isLead = $this->user->isInGroupNamed('Leads');
33 33
             if($this->isLead)
34 34
             {
35
-                 $this->is_admin = true;
35
+                    $this->is_admin = true;
36 36
             }
37 37
         }
38 38
     }
Please login to merge, or discard this patch.
api/v1/class.ShiftAPI.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     protected function canUpdate($request, $entity)
31 31
     {
32
- 	if($this->isVolunteerAdmin($request))
32
+        if($this->isVolunteerAdmin($request))
33 33
         {
34 34
             return true;
35 35
         }
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
             $ret = $dataTable->update($filter, $entArray[$i]);
103 103
             if($ret === false)
104 104
             {
105
-               $myRet = false;
106
-               array_push($errors, $array[$i]);
105
+                $myRet = false;
106
+                array_push($errors, $array[$i]);
107 107
             }
108 108
         }
109 109
         if($myRet)
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
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 
67 67
     public function isFilled()
68 68
     {
69
-         return isset($this->dbData['status']) && ($this->dbData['status'] === 'pending' || $this->dbData['status'] === 'filled');
69
+            return isset($this->dbData['status']) && ($this->dbData['status'] === 'pending' || $this->dbData['status'] === 'filled');
70 70
     }
71 71
 
72 72
     public function findOverlaps($uid, $shortCircuit = false)
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.Processor.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 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
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Emails/class.PendingRejectedEmail.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -3,6 +3,9 @@
 block discarded – undo
3 3
 
4 4
 class PendingRejectedEmail extends VolunteerEmail
5 5
 {
6
+    /**
7
+     * @param \VolunteerProfile $userProfile
8
+     */
6 9
     public function __construct($userProfile)
7 10
     {
8 11
         parent::__construct($userProfile);
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.