Completed
Push — FVSv2 ( e6ffd8...1cdbcb )
by Patrick
01:32
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.
app/Schedules/class.GridSchedule.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         {
52 52
             for($j = 0; $j < $rowCount; $j++)
53 53
             {
54
-                 $cell = $sheat->getCellByColumnAndRow($i+2, $j+4);
54
+                 $cell = $sheat->getCellByColumnAndRow($i + 2, $j + 4);
55 55
                  if($cell->isInMergeRange())
56 56
                  {
57 57
                       continue;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     protected function createShiftCell($sheat, $col, $row, $shift)
95 95
     {
96
-        $sheat->mergeCellsByColumnAndRow($col, $row, $col+$shift['length']-1, $row);
96
+        $sheat->mergeCellsByColumnAndRow($col, $row, $col + $shift['length'] - 1, $row);
97 97
         $this->setShiftNameInCell($sheat, $col, $row, $shift);
98 98
     }
99 99
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $start = date_parse($str);
142 142
         $lastShift = $shifts[$count - 1];
143 143
         $interval = $lastShift['endTime']->diff($shifts[0]['startTime']);
144
-        $hourCount = ($interval->d*24) + $interval->h;
144
+        $hourCount = ($interval->d * 24) + $interval->h;
145 145
         $tmp = $this->getHoursArrays($start['hour'], $hourCount);
146 146
         $simpleHours = $tmp[0];
147 147
         $militaryHours = $tmp[1];
@@ -212,30 +212,30 @@  discard block
 block discarded – undo
212 212
         {
213 213
             $i = 1;
214 214
             $timeDiff = $originalStartTime->diff($shift['startTime']);
215
-            $hoursFromStart = ($timeDiff->d*24)+$timeDiff->h;
215
+            $hoursFromStart = ($timeDiff->d * 24) + $timeDiff->h;
216 216
             $firstRow = array_search($shift['roleID'], $rows);
217
-            $cell = $sheat->getCellByColumnAndRow($hoursFromStart+2, $firstRow+4);
217
+            $cell = $sheat->getCellByColumnAndRow($hoursFromStart + 2, $firstRow + 4);
218 218
             if($cell->isInMergeRange())
219 219
             {
220
-                while($rows[$firstRow+$i] === $shift['roleID'])
220
+                while($rows[$firstRow + $i] === $shift['roleID'])
221 221
                 {
222
-                    $cell = $sheat->getCellByColumnAndRow($hoursFromStart+2, $firstRow+4+$i);
222
+                    $cell = $sheat->getCellByColumnAndRow($hoursFromStart + 2, $firstRow + 4 + $i);
223 223
                     if(!$cell->isInMergeRange())
224 224
                     {
225 225
                         break;
226 226
                     }
227 227
                     $i++;
228 228
                 }
229
-                $this->createShiftCell($sheat, $hoursFromStart+2, $firstRow+4+$i, $shift);
229
+                $this->createShiftCell($sheat, $hoursFromStart + 2, $firstRow + 4 + $i, $shift);
230 230
             }
231 231
             else
232 232
             {
233
-                $this->createShiftCell($sheat, $hoursFromStart+2, $firstRow+4, $shift);
233
+                $this->createShiftCell($sheat, $hoursFromStart + 2, $firstRow + 4, $shift);
234 234
             }
235 235
             $shift = array_shift($shifts);
236 236
         }
237 237
         $rowCount = count($rows);
238
-        $style = $sheat->getStyleByColumnAndRow(2, 4, 1+count($simpleHours), 3 + $rowCount);
238
+        $style = $sheat->getStyleByColumnAndRow(2, 4, 1 + count($simpleHours), 3 + $rowCount);
239 239
         $style->getBorders()->getAllBorders()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN);
240 240
         $hourCount = count($simpleHours);
241 241
         $this->grayOutUnused($hourCount, $rowCount, $sheat);
Please login to merge, or discard this patch.