Timeouts::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
1
<?php
2
/**
3
 * Timeouts option
4
 * User: moyo
5
 * Date: 2018/7/27
6
 * Time: 6:17 PM
7
 */
8
9
namespace Carno\Redis;
10
11
class Timeouts
12
{
13
    /**
14
     * @var int
15
     */
16
    private $connect = null;
17
18
    /**
19
     * @var int
20
     */
21
    private $execute = null;
22
23
    /**
24
     * Timeouts constructor.
25
     * @param int $connect
26
     * @param int $execute
27
     */
28
    public function __construct(int $connect = 1500, int $execute = 3500)
29
    {
30
        $this->connect = $connect;
31
        $this->execute = $execute;
32
    }
33
34
    /**
35
     * @return int
36
     */
37
    public function connect() : int
38
    {
39
        return $this->connect;
40
    }
41
42
    /**
43
     * @return int
44
     */
45
    public function execute() : int
46
    {
47
        return $this->execute;
48
    }
49
}
50