| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class ZipHelper |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Return string with default name of archive |
||
| 13 | */ |
||
| 14 | 2 | public static function generateRandomNameOfArchive(): string |
|
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Add files from directory to archive |
||
| 24 | * |
||
| 25 | * @param string $directoryPath Absolute or relative path |
||
| 26 | * @param null|string $name Name of archive, if empty the will be generated |
||
| 27 | */ |
||
| 28 | 2 | public static function createArchiveFromDirectory(string $directoryPath, ?string $name = null): string |
|
| 52 |