Completed
Push — master ( 3ff097...503b9d )
by Frederik
06:54
created

SecureConnectionOptions::withTimeout()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Protocol;
5
6
/**
7
 * Class SecureConnectionOptions
8
 * @package Genkgo\Mail\Protocol
9
 * @codeCoverageIgnore
10
 */
11
final class SecureConnectionOptions
12
{
13
14
    /**
15
     * @var float
16
     */
17
    private $timeout = 1;
18
19
    /**
20
     * @param float $connectionTimeout
21
     * @return SecureConnectionOptions
22
     */
23
    public function withTimeout(float $connectionTimeout): SecureConnectionOptions
24
    {
25
        $clone = clone $this;
26
        $clone->timeout = $connectionTimeout;
27
        return $clone;
28
    }
29
30
    /**
31
     * @return float
32
     */
33
    public function getTimeout(): float
34
    {
35
        return $this->timeout;
36
    }
37
}