Completed
Push — FVSv2 ( 9d1e1c...673865 )
by Patrick
06:55 queued 38s
created
app/Schedules/class.SimplePDF.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $timeStr = $start->format('g:i A').' till '.$end->format('g:i A');
36 36
             if(strlen($shifts[$i]['name']) > 0)
37 37
             {
38
-                $timeStr .=' - <i>'.$shifts[$i]['name'].'</i>';
38
+                $timeStr .= ' - <i>'.$shifts[$i]['name'].'</i>';
39 39
             }
40 40
             if(!isset($days[$dateStr]))
41 41
             {
@@ -50,22 +50,22 @@  discard block
 block discarded – undo
50 50
         ksort($days);
51 51
         foreach($days as $dateStr=>$day)
52 52
         {
53
-            $html .='<h2>'.$dateStr.'</h2>';
53
+            $html .= '<h2>'.$dateStr.'</h2>';
54 54
             uksort($day, array($this, 'groupSort'));
55 55
             foreach($day as $shiftStr=>$shifts)
56 56
             {
57 57
                 usort($shifts, array($this, 'shiftSort'));
58
-                $html .='<h3>'.$shiftStr.'</h3>';
59
-                $html .='<table width="100%"><tr><th style="width: 20%">Role</th><th>Volunteer Name</th><th>Volunteer Camp</th></tr>';
58
+                $html .= '<h3>'.$shiftStr.'</h3>';
59
+                $html .= '<table width="100%"><tr><th style="width: 20%">Role</th><th>Volunteer Name</th><th>Volunteer Camp</th></tr>';
60 60
                 foreach($shifts as $shift)
61 61
                 {
62 62
                     //TODO Volunteer info for shift...
63
-                    $html .='<tr><td>'.$this->getRoleNameFromID($shift['roleID']).'</td><td></td><td></td></tr>';
63
+                    $html .= '<tr><td>'.$this->getRoleNameFromID($shift['roleID']).'</td><td></td><td></td></tr>';
64 64
                 }
65
-                $html .='</table>';
65
+                $html .= '</table>';
66 66
             }
67 67
         }
68
-        $html .='</body>';
68
+        $html .= '</body>';
69 69
         $this->setPDFFromHTML($html);
70 70
     }
71 71
 } 
Please login to merge, or discard this patch.
api/v1/class.DepartmentAPI.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -242,6 +242,9 @@
 block discarded – undo
242 242
         return $response;
243 243
     }
244 244
 
245
+    /**
246
+     * @param string $type
247
+     */
245 248
     public function generateGridSchedule($dept, $shifts, $response, $type)
246 249
     {
247 250
         $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.
app/Schedules/class.GridSchedule.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  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);
49
+                 $cell = $sheat->getCellByColumnAndRow($i + 2, $j + 4);
50 50
                  if($cell->isInMergeRange())
51 51
                  {
52 52
                       continue;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $start = date_parse($str);
114 114
         $lastShift = $shifts[$count - 1];
115 115
         $interval = $lastShift['endTime']->diff($shifts[0]['startTime']);
116
-        $hourCount = ($interval->d*24) + $interval->h;
116
+        $hourCount = ($interval->d * 24) + $interval->h;
117 117
         $simpleHours = array();
118 118
         $militaryHours = array();
119 119
         $hour = $start['hour'];
@@ -194,32 +194,32 @@  discard block
 block discarded – undo
194 194
         {
195 195
             $i = 1;
196 196
             $timeDiff = $originalStartTime->diff($shift['startTime']);
197
-            $hoursFromStart = ($timeDiff->d*24)+$timeDiff->h;
197
+            $hoursFromStart = ($timeDiff->d * 24) + $timeDiff->h;
198 198
             $firstRow = array_search($shift['roleID'], $rows);
199
-            $cell = $sheat->getCellByColumnAndRow($hoursFromStart+2, $firstRow+4);
199
+            $cell = $sheat->getCellByColumnAndRow($hoursFromStart + 2, $firstRow + 4);
200 200
             if($cell->isInMergeRange())
201 201
             {
202
-                while($rows[$firstRow+$i] === $shift['roleID'])
202
+                while($rows[$firstRow + $i] === $shift['roleID'])
203 203
                 {
204
-                    $cell = $sheat->getCellByColumnAndRow($hoursFromStart+2, $firstRow+4+$i);
204
+                    $cell = $sheat->getCellByColumnAndRow($hoursFromStart + 2, $firstRow + 4 + $i);
205 205
                     if(!$cell->isInMergeRange())
206 206
                     {
207 207
                         break;
208 208
                     }
209 209
                     $i++;
210 210
                 }
211
-                $sheat->mergeCellsByColumnAndRow($hoursFromStart+2, $firstRow+4+$i, $hoursFromStart+1+$shift['length'], $firstRow+4+$i);
212
-                $this->setShiftNameInCell($sheat, $hoursFromStart+2, $firstRow+4+$i, $shift);
211
+                $sheat->mergeCellsByColumnAndRow($hoursFromStart + 2, $firstRow + 4 + $i, $hoursFromStart + 1 + $shift['length'], $firstRow + 4 + $i);
212
+                $this->setShiftNameInCell($sheat, $hoursFromStart + 2, $firstRow + 4 + $i, $shift);
213 213
             }
214 214
             else
215 215
             {
216
-                $sheat->mergeCellsByColumnAndRow($hoursFromStart+2, $firstRow+4, $hoursFromStart+1+$shift['length'], $firstRow+4);
217
-                $this->setShiftNameInCell($sheat, $hoursFromStart+2, $firstRow+4, $shift);
216
+                $sheat->mergeCellsByColumnAndRow($hoursFromStart + 2, $firstRow + 4, $hoursFromStart + 1 + $shift['length'], $firstRow + 4);
217
+                $this->setShiftNameInCell($sheat, $hoursFromStart + 2, $firstRow + 4, $shift);
218 218
             }
219 219
             $shift = array_shift($shifts);
220 220
         }
221 221
         $rowCount = count($rows);
222
-        $style = $sheat->getStyleByColumnAndRow(2, 4, 1+count($simpleHours), 3 + $rowCount);
222
+        $style = $sheat->getStyleByColumnAndRow(2, 4, 1 + count($simpleHours), 3 + $rowCount);
223 223
         $style->getBorders()->getAllBorders()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN);
224 224
         $hourCount = count($simpleHours);
225 225
         $this->grayOutUnused($hourCount, $rowCount, $sheat);
Please login to merge, or discard this patch.
api/v1/class.Processor.php 1 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.