GeneratorStatus::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
ccs 6
cts 6
cp 1
cc 1
eloc 5
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Gendoria\CruftFlake\Generator;
4
5
/**
6
 * Data Transfer Object containing generator status information.
7
 *
8
 * @author Tomasz Struczyński <[email protected]>
9
 */
10
class GeneratorStatus
11
{
12
    /**
13
     * Machine ID.
14
     * 
15
     * @var int
16
     */
17
    public $machine;
18
19
    /**
20
     * Generator timestamp of last ID generation (converted with epoch).
21
     * 
22
     * @var int
23
     */
24
    public $lastTime;
25
26
    /**
27
     * Current sequence.
28
     * 
29
     * @var int
30
     */
31
    public $sequence;
32
33
    /**
34
     * True, if server works in 32bit mode.
35
     * 
36
     * @var bool
37
     */
38
    public $is32Bit;
39
40
    /**
41
     * Class constructor.
42
     * 
43
     * @param int  $machine
44
     * @param int  $lastTime
45
     * @param int  $sequence
46
     * @param bool $is32Bit
47
     */
48 2
    public function __construct($machine, $lastTime, $sequence, $is32Bit)
49
    {
50 2
        $this->machine = $machine;
51 2
        $this->lastTime = $lastTime;
52 2
        $this->sequence = $sequence;
53 2
        $this->is32Bit = $is32Bit;
54 2
    }
55
}
56