Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
42 | public function convert($clover, $target, $templatePath = null): void |
||
43 | { |
||
44 | if (is_file($clover) === false) { |
||
45 | throw new \InvalidArgumentException(sprintf('"%s" is not a file', $clover)); |
||
46 | } |
||
47 | |||
48 | if (is_dir($target) === true) { |
||
49 | throw new \InvalidArgumentException(sprintf('Target must be empty "%s"', $target)); |
||
50 | } |
||
51 | |||
52 | $this->render->render( |
||
53 | $this->hydrator->xmlToDto(simplexml_load_file($clover), new Root()), |
||
54 | $target, |
||
55 | $templatePath |
||
56 | ); |
||
57 | } |
||
58 | } |
||
59 |