Total Complexity | 7 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class FileHelper |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @param string $path The path of an item. |
||
15 | * @param string $basePath The absolute base path. |
||
16 | * @return string The absolute path of the given item. |
||
17 | */ |
||
18 | public static function toAbsolutePath(string $path, string $basePath): string |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Check whether the path is writable and create the missing folders if needed. |
||
27 | * |
||
28 | * @param string $filePath The file path to check. |
||
29 | * @throws InvalidArgumentException If the path is invalid. |
||
30 | */ |
||
31 | public static function ensureFileIsWritable(string $filePath): void |
||
52 |