Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
27 | public function save(): string |
||
28 | { |
||
29 | $path = $this->getPath(); |
||
30 | |||
31 | if (!\is_dir($path)) { |
||
32 | \mkdir($path, 0777, true); // @codeCoverageIgnore |
||
33 | } |
||
34 | |||
35 | $output = \sprintf('%1$s/%2$s.%3$s', $path, $this->getFilename(), $this->getExtension()); |
||
36 | |||
37 | \file_put_contents($output, $this->getContent()); |
||
38 | |||
39 | return $output; |
||
40 | } |
||
59 |