| 1 | <?php |
||
| 10 | class Cleaner |
||
| 11 | { |
||
| 12 | /** @var TempDirectory */ |
||
| 13 | private $tempDirectory; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Cleaner constructor. |
||
| 17 | * @param TempDirectory $tempDirectory |
||
| 18 | */ |
||
| 19 | 14 | public function __construct(TempDirectory $tempDirectory) |
|
| 23 | |||
| 24 | 14 | public function purgeCurrentTempDir() |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $dir |
||
| 31 | * @return bool True if the directory existed and it has been deleted |
||
| 32 | */ |
||
| 33 | 55 | public static function cleanUpDir(string $dir): bool |
|
| 52 | } |
||
| 53 |