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

tempestphp / tempest-framework / 14429341969

13 Apr 2025 12:12PM UTC coverage: 80.175% (-1.0%) from 81.217%
14429341969

Pull #1149

github

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

200 of 434 new or added lines in 22 files covered. (46.08%)

11748 of 14653 relevant lines covered (80.17%)

104.55 hits per line

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

50.0
/src/Tempest/Storage/src/MissingAdapterException.php
1
<?php
2

3
namespace Tempest\Storage;
4

5
use Exception;
6
use League\Flysystem\AwsS3V3\AwsS3V3Adapter;
7
use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter;
8
use League\Flysystem\Ftp\FtpAdapter;
9
use League\Flysystem\GoogleCloudStorage\GoogleCloudStorageAdapter;
10
use League\Flysystem\InMemory\InMemoryFilesystemAdapter;
11
use League\Flysystem\PhpseclibV3\SftpAdapter;
12
use League\Flysystem\ReadOnly\ReadOnlyFilesystemAdapter;
13
use League\Flysystem\ZipArchive\ZipArchiveAdapter;
14

15
final class MissingAdapterException extends Exception implements StorageException
16
{
17
    public function __construct(
1✔
18
        private readonly string $missing,
19
    ) {
20
        $packageName = $this->getPackageName();
1✔
21
        $message = $packageName
1✔
NEW
22
            ? sprintf('The `%s` adapter is missing. Install it using `composer require %s`.', $missing, $packageName)
×
23
            : sprintf('The `%s` adapter is missing.', $missing);
1✔
24

25
        parent::__construct($message);
1✔
26
    }
27

28
    private function getPackageName(): ?string
1✔
29
    {
30
        return match ($this->missing) {
1✔
NEW
31
            AwsS3V3Adapter::class => 'league/flysystem-aws-s3-v3',
×
NEW
32
            InMemoryFilesystemAdapter::class => 'league/flysystem-memory',
×
NEW
33
            ReadOnlyFilesystemAdapter::class => 'league/flysystem-read-only',
×
NEW
34
            SftpAdapter::class => 'league/flysystem-sftp',
×
NEW
35
            ZipArchiveAdapter::class => 'league/flysystem-ziparchive',
×
NEW
36
            AzureBlobStorageAdapter::class => 'league/flysystem-azure-blob-storage',
×
NEW
37
            FtpAdapter::class => 'league/flysystem-ftp',
×
NEW
38
            GoogleCloudStorageAdapter::class => 'league/flysystem-google-cloud-storage',
×
39
            default => null,
1✔
40
        };
1✔
41
    }
42
}
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