Completed
Push — FVSv2 ( c17b7d...6cb237 )
by Patrick
01:37
created
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;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $start = date_parse($str);
106 106
         $lastShift = $shifts[$count - 1];
107 107
         $interval = $lastShift['endTime']->diff($shifts[0]['startTime']);
108
-        $hourCount = ($interval->d*24) + $interval->h;
108
+        $hourCount = ($interval->d * 24) + $interval->h;
109 109
         $simpleHours = array();
110 110
         $militaryHours = array();
111 111
         $hour = $start['hour'];
@@ -186,38 +186,38 @@  discard block
 block discarded – undo
186 186
         {
187 187
             $i = 1;
188 188
             $timeDiff = $originalStartTime->diff($shift['startTime']);
189
-            $hoursFromStart = ($timeDiff->d*24)+$timeDiff->h;
189
+            $hoursFromStart = ($timeDiff->d * 24) + $timeDiff->h;
190 190
             $firstRow = array_search($shift['roleID'], $rows);
191
-            $cell = $sheat->getCellByColumnAndRow($hoursFromStart+2, $firstRow+4);
191
+            $cell = $sheat->getCellByColumnAndRow($hoursFromStart + 2, $firstRow + 4);
192 192
             if($cell->isInMergeRange())
193 193
             {
194
-                while($rows[$firstRow+$i] === $shift['roleID'])
194
+                while($rows[$firstRow + $i] === $shift['roleID'])
195 195
                 {
196
-                    $cell = $sheat->getCellByColumnAndRow($hoursFromStart+2, $firstRow+4+$i);
196
+                    $cell = $sheat->getCellByColumnAndRow($hoursFromStart + 2, $firstRow + 4 + $i);
197 197
                     if(!$cell->isInMergeRange())
198 198
                     {
199 199
                         break;
200 200
                     }
201 201
                     $i++;
202 202
                 }
203
-                $sheat->mergeCellsByColumnAndRow($hoursFromStart+2, $firstRow+4+$i, $hoursFromStart+1+$shift['length'], $firstRow+4+$i);
203
+                $sheat->mergeCellsByColumnAndRow($hoursFromStart + 2, $firstRow + 4 + $i, $hoursFromStart + 1 + $shift['length'], $firstRow + 4 + $i);
204 204
                 if(isset($shift['participant']))
205 205
                 {
206
-                    $sheat->setCellValueByColumnAndRow($hoursFromStart+2, $firstRow+4+$i, $this->getParticipantDiplayName($shift['participant']));
206
+                    $sheat->setCellValueByColumnAndRow($hoursFromStart + 2, $firstRow + 4 + $i, $this->getParticipantDiplayName($shift['participant']));
207 207
                 }
208 208
             }
209 209
             else
210 210
             {
211
-                $sheat->mergeCellsByColumnAndRow($hoursFromStart+2, $firstRow+4, $hoursFromStart+1+$shift['length'], $firstRow+4);
211
+                $sheat->mergeCellsByColumnAndRow($hoursFromStart + 2, $firstRow + 4, $hoursFromStart + 1 + $shift['length'], $firstRow + 4);
212 212
                 if(isset($shift['participant']))
213 213
                 {
214
-                    $sheat->setCellValueByColumnAndRow($hoursFromStart+2, $firstRow+4, $this->getParticipantDiplayName($shift['participant']));
214
+                    $sheat->setCellValueByColumnAndRow($hoursFromStart + 2, $firstRow + 4, $this->getParticipantDiplayName($shift['participant']));
215 215
                 }
216 216
             }
217 217
             $shift = array_shift($shifts);
218 218
         }
219 219
         $rowCount = count($rows);
220
-        $style = $sheat->getStyleByColumnAndRow(2, 4, 1+count($simpleHours), 3 + $rowCount);
220
+        $style = $sheat->getStyleByColumnAndRow(2, 4, 1 + count($simpleHours), 3 + $rowCount);
221 221
         $style->getBorders()->getAllBorders()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN);
222 222
         $hourCount = count($simpleHours);
223 223
         $this->grayOutUnused($hourCount, $rowCount, $sheat);
Please login to merge, or discard this patch.