| Total Complexity | 6 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class ApiDataProcessing |
||
| 16 | { |
||
| 17 | |||
| 18 | 3 | public function loopThroughDate($dateArray): array |
|
| 19 | { |
||
| 20 | 3 | $newDateArray = []; |
|
| 21 | 3 | forEach ($dateArray as $date) { |
|
| 22 | 3 | $modifiedDate = date("Y-m-d", array_shift($date)); |
|
| 23 | 3 | array_push($newDateArray, $modifiedDate); |
|
| 24 | } |
||
| 25 | 3 | return $newDateArray; |
|
| 26 | } |
||
| 27 | 3 | public function loopThroughTemp($dateArray, $el1, $el2): array |
|
| 28 | { |
||
| 29 | 3 | $newTempArray = []; |
|
| 30 | 3 | forEach ($dateArray as $temp) { |
|
| 31 | 3 | $modTemp = $temp[$el1][$el2]; |
|
| 32 | 3 | array_push($newTempArray, substr($modTemp,0 ,5)); |
|
| 33 | } |
||
| 34 | 3 | return $newTempArray; |
|
| 35 | } |
||
| 36 | 3 | public function loopThroughDesc($dateArray, $el1, $el2): array |
|
| 44 | } |
||
| 45 | } |
||
| 46 |