Completed
Push — FVSv2 ( 6cb237...94c8ac )
by Patrick
01:20
created
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 2 patches
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.
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.