app/Services/UpgradeService.php
public function webtreesZipContents(string $zip_file): Collection
    {
        $zip_adapter    = new ZipArchiveAdapter($zip_file, null, 'webtrees');
        $zip_filesystem = new Filesystem(new CachedAdapter($zip_adapter, new Memory()));
        $paths          = new Collection($zip_filesystem->listContents('', true));

        return $paths->filter(static function (array $path): bool {
            return $path['type'] === 'file';
        })
            ->map(static function (array $path): string {
                return $path['path'];
            });
    }
public function webtreesZipContents(string $zip_file): Collection
    {
        $zip_adapter    = new ZipArchiveAdapter($zip_file, null, 'webtrees');
        $zip_filesystem = new Filesystem(new CachedAdapter($zip_adapter, new Memory()));
        $paths          = new Collection($zip_filesystem->listContents('', true));

        return $paths->filter(static function (array $path): bool {
            return $path['type'] === 'file';
        })
            ->map(static function (array $path): string {
                return $path['path'];
            });
    }
public function webtreesZipContents ( string $ zip_file ) : Collection { $ zip_adapter = new ZipArchiveAdapter ( $ zip_file , null , 'webtrees' ) ; $ zip_filesystem = new Filesystem ( new CachedAdapter ( $ zip_adapter , new Memory ( ) ) ) ; $ paths = new Collection ( $ zip_filesystem -> listContents ( '' , true ) ) ; return $ paths -> filter ( static function ( array $ path ) : bool { return $ path [ 'type' ] === 'file' ; } ) -> map ( static function ( array $ path ) : string { return $ path [ 'path' ] ; } ) ; }
Create a list of all the files in a webtrees .ZIP archive

@param string $zip_file

@return Collection
Create a list of all the files in a webtrees . ZIP archive