Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
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 | |||
24 | throw new LogicException($message); |
||
25 | } |
||
26 | $outContent = $dataOutput[$name]; |
||
27 | $data[] = [ |
||
28 | 'input' => $content, |
||
29 | 'output' => $outContent, |
||
30 | ]; |
||
31 | } |
||
32 | |||
33 | return $data; |
||
34 | } |
||
87 |