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

tempestphp / tempest-framework / 14422947791

12 Apr 2025 08:05PM UTC coverage: 80.081% (-1.1%) from 81.217%
14422947791

Pull #1149

github

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

151 of 390 new or added lines in 21 files covered. (38.72%)

11699 of 14609 relevant lines covered (80.08%)

104.66 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\Ftp\FtpAdapter;
6
use League\Flysystem\Ftp\FtpConnectionOptions;
7

8
final class FTPStorageConfig implements StorageConfig
9
{
10
    public const string WINDOWS = 'windows';
11

12
    public const string UNIX = 'UNIX';
13

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

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