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