| Total Complexity | 6 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class SearchIndexPathResolver |
||
| 13 | { |
||
| 14 | public function __construct( |
||
| 15 | private string $indexDir, |
||
| 16 | ) { |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Returns the absolute directory where the Xapian index is stored. |
||
| 21 | * Ensures that the directory exists on disk. |
||
| 22 | */ |
||
| 23 | public function getIndexDir(): string |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Ensures that the index directory exists and is writable. |
||
| 32 | * |
||
| 33 | * @throws \RuntimeException When the directory cannot be created. |
||
| 34 | */ |
||
| 35 | public function ensureIndexDirectoryExists(): void |
||
| 48 |