Completed
Push — FVSv2 ( 78f5f9...0e95d7 )
by Patrick
01:35
created
api/v1/class.DepartmentAPI.php 3 patches
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.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use PhpOffice\PhpSpreadsheet\Spreadsheet;
4
-use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
5
-use PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf;
6
-
7 3
 class DepartmentAPI extends Http\Rest\DataTableAPI
8 4
 {
9 5
     use Processor;
Please login to merge, or discard this patch.
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.
app/Schedules/class.GridSchedule.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -45,15 +45,15 @@  discard block
 block discarded – undo
45 45
             $shifts[$i]['length'] = $diff->h;
46 46
             if(!isset($roles[$shifts[$i]['roleID']]))
47 47
             {
48
-                 $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
49
-                 $roles2[$shifts[$i]['roleID']] = array();
48
+                    $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
49
+                    $roles2[$shifts[$i]['roleID']] = array();
50 50
             }
51 51
             else
52 52
             {
53
-                 if($roles[$shifts[$i]['roleID']] < $shifts[$i]['length'])
54
-                 {
55
-                     $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
56
-                 }
53
+                    if($roles[$shifts[$i]['roleID']] < $shifts[$i]['length'])
54
+                    {
55
+                        $roles[$shifts[$i]['roleID']] = $shifts[$i]['length'];
56
+                    }
57 57
             }
58 58
             array_push($roles2[$shifts[$i]['roleID']], array('start'=>$start, 'end'=>$end));
59 59
         }
@@ -196,17 +196,17 @@  discard block
 block discarded – undo
196 196
         {
197 197
             for($j = 0; $j < $rowCount; $j++)
198 198
             {
199
-                 $cell = $sheat->getCellByColumnAndRow($i+2, $j+4);
200
-                 if($cell->isInMergeRange())
201
-                 {
202
-                      continue;
203
-                 }
204
-                 else
205
-                 {
206
-                     $style = $cell->getStyle();
207
-                     $style->getBorders()->getAllBorders()->setBorderStyle(false);
208
-                     $style->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTGRAY);
209
-                 }
199
+                    $cell = $sheat->getCellByColumnAndRow($i+2, $j+4);
200
+                    if($cell->isInMergeRange())
201
+                    {
202
+                        continue;
203
+                    }
204
+                    else
205
+                    {
206
+                        $style = $cell->getStyle();
207
+                        $style->getBorders()->getAllBorders()->setBorderStyle(false);
208
+                        $style->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTGRAY);
209
+                    }
210 210
             }
211 211
         }
212 212
         $sheat->getColumnDimension('A')->setAutoSize(true);
Please login to merge, or discard this patch.