Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function getData($id) |
||
14 | { |
||
15 | $dataInput = $this->getInputFiles($id); |
||
16 | $dataOutput = $this->getOutputFiles($id); |
||
17 | |||
18 | $data = []; |
||
19 | foreach ($dataInput as $name => $content) { |
||
20 | if (!array_key_exists($name, $dataOutput)) { |
||
21 | $message = 'Problem Data is not match!'; |
||
22 | app('log')->error($message, ['pid' => $id]); |
||
23 | throw new LogicException($message); |
||
24 | } |
||
25 | $outContent = $dataOutput[$name]; |
||
26 | $data[] = [ |
||
27 | 'input' => $content, |
||
28 | 'output' => $outContent, |
||
29 | ]; |
||
30 | } |
||
31 | |||
32 | return $data; |
||
33 | } |
||
84 |