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

Database::getContext()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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
9
/**
10
 * @namespace
11
 */
12
namespace Yandex\DataSync\Models;
13
14
use Yandex\Market\Partner\Models;
15
16
/**
17
 * Class Database
18
 *
19
 * @category Yandex
20
 * @package  DataSync
21
 *
22
 * @author   Alexander Khaylo <[email protected]>
23
 * @created  01.03.16 12:03
24
 */
25
use Yandex\Common\Model;
26
27
class Database extends Model
28
{
29
    protected $propNameMap = [
30
        'records_count' => 'recordsCount',
31
        'database_id'   => 'databaseId'
32
    ];
33
34
    /**
35
     * The number of entries in the database.
36
     *
37
     * @var int
38
     */
39
    protected $recordsCount;
40
41
    /**
42
     * Date of creation database.
43
     *
44
     * @var int
45
     */
46
    protected $created;
47
48
    /**
49
     * Date of last modification.
50
     *
51
     * @var int
52
     */
53
    protected $modified;
54
55
    /**
56
     * ID of the database.
57
     *
58
     * @var string
59
     */
60
    protected $databaseId;
61
62
    /**
63
     * Description of the database.
64
     *
65
     * @var string
66
     */
67
    protected $title;
68
69
    /**
70
     * Number of the current revision.
71
     *
72
     * @var integer
73
     */
74
    protected $revision;
75
76
    /**
77
     * Database Size in bytes.
78
     *
79
     * @var integer
80
     */
81
    protected $size;
82
83
    /**
84
     * Database context.
85
     *
86
     * @var string
87
     */
88
    protected $context;
89
90
    /**
91
     * @return string
92
     */
93 4
    public function getTitle()
94
    {
95 4
        return $this->title;
96
    }
97
98
    /**
99
     * @param string $title
100
     *
101
     * @return $this
102
     */
103 2
    public function setTitle($title)
104
    {
105 2
        $this->title = $title;
106 2
        return $this;
107
    }
108
109
    /**
110
     * @return int
111
     */
112 5
    public function getSize()
113
    {
114 5
        return $this->size;
115
    }
116
117
    /**
118
     * @param int $size
119
     *
120
     * @return $this
121
     */
122 2
    public function setSize($size)
123
    {
124 2
        $this->size = $size;
125 2
        return $this;
126
    }
127
128
    /**
129
     * @return int
130
     */
131 5
    public function getRevision()
132
    {
133 5
        return $this->revision;
134
    }
135
136
    /**
137
     * @param int $revision
138
     *
139
     * @return $this
140
     */
141 2
    public function setRevision($revision)
142
    {
143 2
        $this->revision = $revision;
144 2
        return $this;
145
    }
146
147
    /**
148
     * @return int
149
     */
150 5
    public function getRecordsCount()
151
    {
152 5
        return $this->recordsCount;
153
    }
154
155
    /**
156
     * @param int $recordsCount
157
     *
158
     * @return $this
159
     */
160 2
    public function setRecordsCount($recordsCount)
161
    {
162 2
        $this->recordsCount = $recordsCount;
163 2
        return $this;
164
    }
165
166
    /**
167
     * @return int
168
     */
169 4
    public function getModified()
170
    {
171 4
        return $this->modified;
172
    }
173
174
    /**
175
     * @param int $modified
176
     *
177
     * @return $this
178
     */
179 2
    public function setModified($modified)
180
    {
181 2
        $this->modified = $modified;
182 2
        return $this;
183
    }
184
185
    /**
186
     * @return string
187
     */
188 4
    public function getDatabaseId()
189
    {
190 4
        return $this->databaseId;
191
    }
192
193
    /**
194
     * @param string $databaseId
195
     *
196
     * @return $this
197
     */
198 1
    public function setDatabaseId($databaseId)
199
    {
200 1
        $this->databaseId = $databaseId;
201 1
        return $this;
202
    }
203
204
    /**
205
     * @return int
206
     */
207 4
    public function getCreated()
208
    {
209 4
        return $this->created;
210
    }
211
212
    /**
213
     * @param int $created
214
     *
215
     * @return $this
216
     */
217 2
    public function setCreated($created)
218
    {
219 2
        $this->created = $created;
220 2
        return $this;
221
    }
222
223
    /**
224
     * @return string
225
     */
226 4
    public function getContext()
227
    {
228 4
        return $this->context;
229
    }
230
231
    /**
232
     * @param string $context
233
     *
234
     * @return $this
235
     */
236 6
    public function setContext($context)
237
    {
238 6
        $this->context = $context;
239 6
        return $this;
240
    }
241
}
242