| Total Complexity | 5 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class FileWriter |
||
| 12 | { |
||
| 13 | private bool $overwrite = false; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Forces to overwrite file, but only in next write attempt |
||
| 17 | * |
||
| 18 | * @return $this |
||
| 19 | */ |
||
| 20 | public function forceOverwrite(): self |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Writes given content into specified file path |
||
| 29 | * |
||
| 30 | * @param string $path |
||
| 31 | * @param string $content |
||
| 32 | */ |
||
| 33 | public function write(string $path, string $content): void |
||
| 48 |