Total Complexity | 4 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
9 | class Helper |
||
10 | { |
||
11 | /** |
||
12 | * Generate a unique name in a specific dir |
||
13 | * |
||
14 | * @param string $dir the especific dir where the file will be saved |
||
15 | * @param bool $withPath |
||
16 | * |
||
17 | * @return string |
||
18 | */ |
||
19 | public static function generateUniqueName(File $file, string $dir, $withPath = false) : string |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Create a File instance from a given path |
||
40 | * |
||
41 | * @param string $path Path of the file to be used |
||
42 | * |
||
43 | * @return File |
||
44 | */ |
||
45 | public static function pathToFile(string $path) : File |
||
57 |