Completed
Pull Request — master (#143)
by Alexander
05:04
created

DatabaseDeltasResponse   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 117
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 10
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 117
ccs 25
cts 25
cp 1
rs 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseRevision() 0 4 1
A setBaseRevision() 0 4 1
A getItems() 0 4 1
A setItems() 0 4 1
A getLimit() 0 4 1
A setLimit() 0 4 1
A getRevision() 0 4 1
A setRevision() 0 4 1
A getTotal() 0 4 1
A setTotal() 0 4 1
1
<?php
2
/**
3
 * Yandex PHP Library
4
 *
5
 * @copyright NIX Solutions Ltd.
6
 * @link      https://github.com/nixsolutions/yandex-php-library
7
 */
8
namespace Yandex\DataSync\Responses;
9
10
use Yandex\Common\Model;
11
use Yandex\DataSync\Models\Database\Deltas;
12
13
/**
14
 * Class DatabaseDeltasResponse
15
 *
16
 * @package  Yandex\DataSync\Responses
17
 * @author   Alexander Khaylo <[email protected]>
18
 */
19
class DatabaseDeltasResponse extends Model
20
{
21
    protected $propNameMap = [
22
        'base_revision' => 'baseRevision'
23
    ];
24
25
    protected $mappingClasses = [
26
        'items' => 'Yandex\DataSync\Models\Database\Deltas',
27
    ];
28
29
    /**
30
     * @var int
31
     */
32
    protected $baseRevision;
33
34
    /**
35
     * @var int
36
     */
37
    protected $total;
38
39
    /**
40
     * @var int
41
     */
42
    protected $limit;
43
44
    /**
45
     * Number of the current revision.
46
     *
47
     * @var integer
48
     */
49
    protected $revision;
50
51
    /**
52
     * @var Deltas
53
     */
54
    protected $items;
55
56
    /**
57
     * @return int
58
     */
59 2
    public function getBaseRevision()
60
    {
61 2
        return $this->baseRevision;
62
    }
63
64
    /**
65
     * @param int $baseRevision
66
     */
67 1
    public function setBaseRevision($baseRevision)
68
    {
69 1
        $this->baseRevision = $baseRevision;
70 1
    }
71
72
    /**
73
     * @return Deltas
74
     */
75 1
    public function getItems()
76
    {
77 1
        return $this->items;
78
    }
79
80
    /**
81
     * @param Deltas $items
82
     */
83 1
    public function setItems($items)
84
    {
85 1
        $this->items = $items;
86 1
    }
87
88
    /**
89
     * @return int
90
     */
91 2
    public function getLimit()
92
    {
93 2
        return $this->limit;
94
    }
95
96
    /**
97
     * @param int $limit
98
     */
99 1
    public function setLimit($limit)
100
    {
101 1
        $this->limit = $limit;
102 1
    }
103
104
    /**
105
     * @return int
106
     */
107 2
    public function getRevision()
108
    {
109 2
        return $this->revision;
110
    }
111
112
    /**
113
     * @param int $revision
114
     */
115 1
    public function setRevision($revision)
116
    {
117 1
        $this->revision = $revision;
118 1
    }
119
120
    /**
121
     * @return int
122
     */
123 2
    public function getTotal()
124
    {
125 2
        return $this->total;
126
    }
127
128
    /**
129
     * @param int $total
130
     */
131 1
    public function setTotal($total)
132
    {
133 1
        $this->total = $total;
134 1
    }
135
}
136