| Conditions | 4 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function ensureIndexDirectoryExists(): void |
||
| 36 | { |
||
| 37 | if (\is_dir($this->indexDir)) { |
||
| 38 | return; |
||
| 39 | } |
||
| 40 | |||
| 41 | if (!@\mkdir($this->indexDir, 0775, true) && !\is_dir($this->indexDir)) { |
||
| 42 | throw new \RuntimeException( |
||
| 43 | \sprintf('Unable to create Xapian index directory: %s', $this->indexDir) |
||
| 44 | ); |
||
| 48 |