| 1 | <?php |
||
| 12 | class TempFilenameFactory |
||
| 13 | { |
||
| 14 | /** @var TempDirectory */ |
||
| 15 | private $tempDirectory; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * TempFilenameFactory constructor. |
||
| 19 | * @param TempDirectory $tempDirectory |
||
| 20 | 42 | */ |
|
| 21 | public function __construct(TempDirectory $tempDirectory) |
||
| 25 | |||
| 26 | public function getPathForLog(): string |
||
| 30 | 17 | ||
| 31 | /** |
||
| 32 | * @param string $uniqueId |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | public function getFilenameForLog(string $uniqueId): string |
||
| 36 | { |
||
| 37 | 31 | return $this->getTempFilename('logs', $uniqueId, 'json.log'); |
|
| 38 | } |
||
| 39 | 31 | ||
| 40 | public function getFilenameForCoverage(string $uniqueId): string |
||
| 41 | { |
||
| 42 | return $this->getTempFilename('coverage', $uniqueId, 'php'); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getFilenameForConfiguration(): string |
||
| 49 | |||
| 50 | private function getTempFilename(string $subDir, string $filename, string $extension): string |
||
| 51 | { |
||
| 57 | |||
| 58 | private function getTempSubDir(string $subDir): string |
||
| 65 | } |
||
| 66 |