RunnerOptions::getBasicAuth()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace DjThossi\SmokeTestingPhp\Options;
3
4
use DjThossi\SmokeTestingPhp\Collection\UrlCollection;
5
use DjThossi\SmokeTestingPhp\ValueObject\BasicAuth;
6
use DjThossi\SmokeTestingPhp\ValueObject\FollowRedirect;
7
use DjThossi\SmokeTestingPhp\ValueObject\RequestTimeout;
8
9 View Code Duplication
class RunnerOptions
10
{
11
    /**
12
     * @var UrlCollection
13
     */
14
    private $urls;
15
16
    /**
17
     * @var RequestTimeout
18
     */
19
    private $requestTimeout;
20
21
    /**
22
     * @var FollowRedirect
23
     */
24
    private $followRedirect;
25
26
    /**
27
     * @var BasicAuth|null
28
     */
29
    private $basicAuth;
30
31
    /**
32
     * @param UrlCollection $urls
33
     * @param RequestTimeout $requestTimeout
34
     * @param FollowRedirect $followRedirect
35
     * @param BasicAuth|null $basicAuth
36
     */
37
    public function __construct(
38
        UrlCollection $urls,
39
        RequestTimeout $requestTimeout,
40
        FollowRedirect $followRedirect,
41
        BasicAuth $basicAuth = null
42
    ) {
43
        $this->urls = $urls;
44
        $this->requestTimeout = $requestTimeout;
45
        $this->followRedirect = $followRedirect;
46
        $this->basicAuth = $basicAuth;
47
    }
48
49
    /**
50
     * @return UrlCollection
51
     */
52
    public function getUrls()
53
    {
54
        return $this->urls;
55
    }
56
57
    /**
58
     * @return RequestTimeout
59
     */
60
    public function getRequestTimeout()
61
    {
62
        return $this->requestTimeout;
63
    }
64
65
    /**
66
     * @return FollowRedirect
67
     */
68
    public function getFollowRedirect()
69
    {
70
        return $this->followRedirect;
71
    }
72
73
    /**
74
     * @return BasicAuth|null
75
     */
76
    public function getBasicAuth()
77
    {
78
        return $this->basicAuth;
79
    }
80
}
81