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