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