Passed
Pull Request — master (#34)
by kacper
03:48
created

BinLogCurrent::getBinFileName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace MySQLReplication\BinLog;
4
5
/**
6
 * Class BinLogCurrent
7
 * @package MySQLReplication\BinLog
8
 */
9
class BinLogCurrent implements \JsonSerializable
10
{
11
    /**
12
     * @var int
13
     */
14
    private $binLogPosition;
15
    /**
16
     * @var string
17
     */
18
    private $binFileName;
19
    /**
20
     * @var string
21
     */
22
    private $gtid;
23
    /**
24
     * @var string
25
     */
26
    private $mariaDbGtid;
27
28
    /**
29
     * @return int
30
     */
31
    public function getBinLogPosition()
32
    {
33
        return $this->binLogPosition;
34
    }
35
36
    /**
37
     * @param int $binLogPosition
38
     */
39 54
    public function setBinLogPosition($binLogPosition)
40
    {
41 54
        $this->binLogPosition = $binLogPosition;
42 54
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getBinFileName()
48
    {
49
        return $this->binFileName;
50
    }
51
52
    /**
53
     * @param string $binFileName
54
     */
55 54
    public function setBinFileName($binFileName)
56
    {
57 54
        $this->binFileName = $binFileName;
58 54
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getGtid()
64
    {
65
        return $this->gtid;
66
    }
67
68
    /**
69
     * @param string $gtid
70
     */
71
    public function setGtid($gtid)
72
    {
73
        $this->gtid = $gtid;
74
    }
75
76
    /**
77
     * @return string
78
     */
79
    public function getMariaDbGtid()
80
    {
81
        return $this->mariaDbGtid;
82
    }
83
84
    /**
85
     * @param string $mariaDbGtid
86
     */
87
    public function setMariaDbGtid($mariaDbGtid)
88
    {
89
        $this->mariaDbGtid = $mariaDbGtid;
90
    }
91
92
    /**
93
     * Specify data which should be serialized to JSON
94
     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
95
     * @return mixed data which can be serialized by <b>json_encode</b>,
96
     * which is a value of any type other than a resource.
97
     * @since 5.4.0
98
     */
99
    public function jsonSerialize()
100
    {
101
        return get_object_vars($this);
102
    }
103
}