private static function openZipFile(string $zip_file, int $flags = null): ZipArchive {

        $zip = new ZipArchive();

        $open = $zip->open($zip_file, $flags);
        if ( $open !== true ) {
            throw new ZipException(StatusCodes::get($open));
        }

        return $zip;

    }
private static function openZipFile(string $zip_file, int $flags = null): ZipArchive {

        $zip = new ZipArchive();

        $open = $zip->open($zip_file, $flags);
        if ( $open !== true ) {
            throw new ZipException(StatusCodes::get($open));
        }

        return $zip;

    }
private static function openZipFile ( string $ zip_file , int $ flags = null ) : ZipArchive { $ zip = new ZipArchive ( ) ; $ open = $ zip -> open ( $ zip_file , $ flags ) ; if ( $ open !== true ) { throw new ZipException ( StatusCodes :: get ( $ open ) ) ; } return $ zip ; }
Open a zip file

@param string $zip_file ZIP file name
@param int $flags ZipArchive::open flags

@return  ZipArchive
@throws  ZipException
Open a zip file