Defaults::getTimeout()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * The Imaging Source Download System PHP Wrapper
6
 *
7
 * PHP wrapper for The Imaging Source Download System Web API. Authored and supported by The Imaging Source Europe GmbH.
8
 *
9
 * @link      http://dl-gui.theimagingsource.com to learn more about The Imaging Source Download System
10
 * @link      https://github.com/jonathanmaron/theimagingsource-tisd-sdk for the canonical source repository
11
 * @license   https://github.com/jonathanmaron/theimagingsource-tisd-sdk/blob/master/LICENSE.md
12
 * @copyright © 2022 The Imaging Source Europe GmbH
13
 */
14
15
namespace Tisd\Sdk\Defaults;
16
17
/**
18
 * Class Defaults
19
 *
20
 * @package Tisd\Sdk\Defaults
21
 */
22
class Defaults extends AbstractDefaults
23
{
24
    /**
25
     * Defaults constructor
26
     */
27 57
    public function __construct()
28
    {
29 57
        $this->setContext('');
30 57
        $this->setHostname(self::HOSTNAME_PRODUCTION);
31 57
        $this->setLocale(self::LOCALE);
32 57
        $this->setTimeout(self::TIMEOUT);
33 57
        $this->setTtl(self::TTL);
34 57
        $this->setVersion(self::VERSION);
35
    }
36
37
    /**
38
     * Get the context
39
     *
40
     * @return string
41
     */
42 49
    public function getContext(): string
43
    {
44 49
        return $this->context;
45
    }
46
47
    /**
48
     * Set the context
49
     *
50
     * @param string $context
51
     *
52
     * @return $this
53
     */
54 57
    public function setContext(string $context): self
55
    {
56 57
        $this->context = $context;
57
58 57
        return $this;
59
    }
60
61
    /**
62
     * Get the hostname
63
     *
64
     * @return string
65
     */
66 49
    public function getHostname(): string
67
    {
68 49
        return $this->hostname;
69
    }
70
71
    /**
72
     * Set the hostname
73
     *
74
     * @param string $hostname
75
     *
76
     * @return $this
77
     */
78 57
    public function setHostname(string $hostname): self
79
    {
80 57
        $this->hostname = $hostname;
81
82 57
        return $this;
83
    }
84
85
    /**
86
     * Get the locale
87
     *
88
     * @return string
89
     */
90 49
    public function getLocale(): string
91
    {
92 49
        return $this->locale;
93
    }
94
95
    /**
96
     * Set the locale
97
     *
98
     * @param string $locale
99
     *
100
     * @return $this
101
     */
102 57
    public function setLocale(string $locale): self
103
    {
104 57
        $this->locale = $locale;
105
106 57
        return $this;
107
    }
108
109
    /**
110
     * Get the timeout
111
     *
112
     * @return int
113
     */
114 49
    public function getTimeout(): int
115
    {
116 49
        return $this->timeout;
117
    }
118
119
    /**
120
     * Set the timeout
121
     *
122
     * @param int $timeout
123
     *
124
     * @return $this
125
     */
126 57
    public function setTimeout(int $timeout): self
127
    {
128 57
        $this->timeout = $timeout;
129
130 57
        return $this;
131
    }
132
133
    /**
134
     * Get the time-to-live
135
     *
136
     * @return int
137
     */
138
    public function getTtl(): int
139
    {
140
        return $this->ttl;
141
    }
142
143
    /**
144
     * Set the time-to-live
145
     *
146
     * @param int $ttl
147
     *
148
     * @return $this
149
     */
150 57
    public function setTtl(int $ttl): self
151
    {
152 57
        $this->ttl = $ttl;
153
154 57
        return $this;
155
    }
156
157
    /**
158
     * Get the version
159
     *
160
     * @return string
161
     */
162 49
    public function getVersion(): string
163
    {
164 49
        return $this->version;
165
    }
166
167
    /**
168
     * Set the version
169
     *
170
     * @param string $version
171
     *
172
     * @return $this
173
     */
174 57
    public function setVersion(string $version): self
175
    {
176 57
        $this->version = $version;
177
178 57
        return $this;
179
    }
180
}
181