Completed
Push — FVSv2 ( abc2fa...7fa7a8 )
by Patrick
01:32
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.DepartmentAPI.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $filter = new \Data\Filter("departmentID eq '$deptId'");
100 100
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
101 101
         $roles = $dataTable->read($filter, $odata->select, $odata->top,
102
-                                  $odata->skip, $odata->orderby);
102
+                                    $odata->skip, $odata->orderby);
103 103
         if($roles === false)
104 104
         {
105 105
             $roles = array();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $filter = new \Data\Filter("departmentID eq '$deptId'");
124 124
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
125 125
         $shifts = $dataTable->read($filter, $odata->select, $odata->top,
126
-                                  $odata->skip, $odata->orderby);
126
+                                    $odata->skip, $odata->orderby);
127 127
         if($shifts === false)
128 128
         {
129 129
             $shifts = array();
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -109,6 +109,9 @@  discard block
 block discarded – undo
109 109
         return $response->withJson($shifts);
110 110
     }
111 111
 
112
+    /**
113
+     * @param string $table
114
+     */
112 115
     protected function createEntityForDepartment($request, $response, $args, $table)
113 116
     {
114 117
         $deptId = $args['dept'];
@@ -212,6 +215,9 @@  discard block
 block discarded – undo
212 215
         return $response;
213 216
     }
214 217
 
218
+    /**
219
+     * @param string $type
220
+     */
215 221
     public function generateGridSchedule($dept, $shifts, $response, $type)
216 222
     {
217 223
         $ss = new \Schedules\GridSchedule($dept, $shifts);
Please login to merge, or discard this patch.
api/v1/class.VolunteerAPI.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -5,6 +5,9 @@
 block discarded – undo
5 5
     protected $isAdmin = null;
6 6
     protected $isLead = null;
7 7
 
8
+    /**
9
+     * @param string $dataTableName
10
+     */
8 11
     public function __construct($dataTableName, $idField = '_id')
9 12
     {
10 13
         parent::__construct('fvs', $dataTableName, $idField);
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.
api/v1/class.Processor.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
             $tmp = $dataTable->read();
178 178
             foreach($tmp as $role)
179 179
             {
180
-               $roles[$role['short_name']] = $role;
180
+                $roles[$role['short_name']] = $role;
181 181
             }
182 182
         }
183 183
         $shift = new \VolunteerShift(false, $entry);
Please login to merge, or discard this patch.
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -1,6 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 trait Processor
3 3
 {
4
+    /**
5
+     * @param string $certType
6
+     */
4 7
     protected function certCheck($requirements, $certs, $certType)
5 8
     {
6 9
         if(isset($requirements[$certType]) && $requirements[$certType])
@@ -10,6 +13,9 @@  discard block
 block discarded – undo
10 13
         return false;
11 14
     }
12 15
 
16
+    /**
17
+     * @param VolunteerProfile|null $user
18
+     */
13 19
     public function canUserDoRole($user, $role)
14 20
     {
15 21
         if($role['publicly_visible'] === true)
@@ -124,6 +130,9 @@  discard block
 block discarded – undo
124 130
         return !in_array($deptId, $privateDepts);
125 131
     }
126 132
 
133
+    /**
134
+     * @param VolunteerShift $shift
135
+     */
127 136
     protected function doShiftTimeChecks($shift, $entry)
128 137
     {
129 138
         $now = new DateTime();
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.