Timeouts   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
A connect() 0 3 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * Timeouts option
4
 * User: moyo
5
 * Date: 2018/7/27
6
 * Time: 6:33 PM
7
 */
8
9
namespace Carno\Database\Options;
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 = 3500, int $execute = 35000)
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