• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tempestphp / tempest-framework / 14424434409

13 Apr 2025 12:08AM UTC coverage: 80.172% (-1.0%) from 81.217%
14424434409

Pull #1149

github

web-flow
Merge 3b7a05345 into 0c553d46c
Pull Request #1149: feat(storage): add storage component

198 of 432 new or added lines in 22 files covered. (45.83%)

11746 of 14651 relevant lines covered (80.17%)

104.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Tempest/Storage/src/Config/ZipArchiveStorageConfig.php
1
<?php
2

3
namespace Tempest\Storage\Config;
4

5
use League\Flysystem\FilesystemAdapter;
6
use League\Flysystem\Local\LocalFilesystemAdapter;
7
use League\Flysystem\ZipArchive\FilesystemZipArchiveProvider;
8
use League\Flysystem\ZipArchive\ZipArchiveAdapter;
9

10
final class ZipArchiveStorageConfig implements StorageConfig
11
{
12
    public string $adapter = ZipArchiveAdapter::class;
13

NEW
14
    public function __construct(
×
15
        /**
16
         * Absolute path to the zip file.
17
         */
18
        public string $path,
19

20
        /**
21
         * Prefix to be used for all paths in the zip archive.
22
         */
23
        public string $prefix = '',
24

25
        /**
26
         * Whether the storage is read-only.
27
         */
28
        public bool $readonly = false,
NEW
29
    ) {}
×
30

NEW
31
    public function createAdapter(): FilesystemAdapter
×
32
    {
NEW
33
        return new ZipArchiveAdapter(
×
NEW
34
            zipArchiveProvider: new FilesystemZipArchiveProvider($this->path),
×
NEW
35
            root: $this->prefix,
×
NEW
36
        );
×
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc