• 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/FTPStorageConfig.php
1
<?php
2

3
namespace Tempest\Storage\Config;
4

5
use League\Flysystem\FilesystemAdapter;
6
use League\Flysystem\Ftp\FtpAdapter;
7
use League\Flysystem\Ftp\FtpConnectionOptions;
8

9
final class FTPStorageConfig implements StorageConfig
10
{
11
    public string $adapter = FtpAdapter::class;
12

13
    public const string WINDOWS = 'windows';
14

15
    public const string UNIX = 'UNIX';
16

NEW
17
    public function __construct(
×
18
        public string $host,
19
        public string $root,
20
        public string $username,
21
        public string $password,
22
        public int $port = 21,
23
        public bool $ssl = false,
24
        public bool $utf8 = false,
25
        public bool $passive = true,
26
        public int $timeoutInSeconds = 90,
27
        public int $transferMode = FTP_BINARY,
28
        public ?string $systemType = null,
29
        public ?bool $ignorePassiveAddress = null,
30
        public bool $recurseManually = true,
31
        public bool $timestampsOnUnixListingsEnabled = false,
32
        public bool $readonly = false,
NEW
33
    ) {}
×
34

NEW
35
    public function createAdapter(): FilesystemAdapter
×
36
    {
NEW
37
        return new FtpAdapter(
×
NEW
38
            connectionOptions: FtpConnectionOptions::fromArray([
×
NEW
39
                'host' => $this->host,
×
NEW
40
                'root' => $this->root,
×
NEW
41
                'username' => $this->username,
×
NEW
42
                'password' => $this->password,
×
NEW
43
                'port' => $this->port,
×
NEW
44
                'ssl' => $this->ssl,
×
NEW
45
                'timeout' => $this->timeoutInSeconds,
×
NEW
46
                'utf8' => $this->utf8,
×
NEW
47
                'passive' => $this->passive,
×
NEW
48
                'transferMode' => $this->transferMode,
×
NEW
49
                'systemType' => $this->systemType ?? null,
×
NEW
50
                'ignorePassiveAddress' => $this->ignorePassiveAddress ?? null,
×
NEW
51
                'timestampsOnUnixListingsEnabled' => $this->timestampsOnUnixListingsEnabled,
×
NEW
52
                'recurseManually' => $this->recurseManually,
×
NEW
53
            ]),
×
NEW
54
        );
×
55
    }
56
}
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