Total Complexity | 7 |
Total Lines | 84 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | class Options |
||
8 | { |
||
9 | /** |
||
10 | * @var string|null |
||
11 | */ |
||
12 | private null|string $userAgent; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | private int $timeout; |
||
18 | |||
19 | /** |
||
20 | * @var string|null |
||
21 | */ |
||
22 | private null|string $proxy; |
||
23 | |||
24 | /** |
||
25 | * @param string $userAgent |
||
26 | * @return $this |
||
27 | */ |
||
28 | public function setUserAgent(string $userAgent): Options |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return string|null |
||
37 | */ |
||
38 | public function getUserAgent(): null|string |
||
39 | { |
||
40 | return $this->userAgent; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param int $timeout |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function setTimeout(int $timeout): Options |
||
48 | { |
||
49 | $this->timeout = $timeout; |
||
50 | |||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return int |
||
56 | */ |
||
57 | public function getTimeout(): int |
||
58 | { |
||
59 | return $this->timeout; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param string $proxy |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function setProxy(string $proxy): Options |
||
67 | { |
||
68 | $this->proxy = $proxy; |
||
69 | |||
70 | return $this; |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | public function getProxy(): string |
||
79 | } |
||
80 | |||
81 | |||
82 | /** |
||
83 | * @param Options $options |
||
84 | * @return $this |
||
85 | */ |
||
86 | public function setFromOptions(Options $options): Options |
||
91 | } |
||
92 | } |
||
93 |