Completed
Pull Request — master (#139)
by
unknown
04:18
created

Category::getId()   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 1
Metric Value
c 1
b 0
f 1
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
namespace Yandex\Market\Content\Models;
4
5
use Yandex\Common\Model;
6
7
class Category extends Model
8
{
9
    protected $id = null;
10
11
    protected $name = null;
12
13
    protected $uniqueName = null;
14
15
    protected $parentId = null;
16
17
    protected $type = null;
18
19
    protected $childrenCount = null;
20
21
    protected $offersCount = null;
22
23
    protected $modelsCount = null;
24
25
    protected $isVisual = false;
26
27
    /**
28
     * Additional properties available during listed requests.
29
     */
30
    protected $vendors = null;
31
32
    protected $children = null;
33
34
    protected $popularity = null;
35
36
    protected $filterId = null;
37
38
    protected $filterValueId = null;
39
40
    protected $imageUrl = null;
41
42
    protected $mappingClasses = [
43
        'vendors' => 'Yandex\Market\Content\Models\Vendors',
44
        'children' => 'Yandex\Market\Content\Models\Categories'
45
    ];
46
47
    protected $propNameMap = [
48
        'visual' => 'isVisual',
49
        'uniqName' => 'uniqueName',
50
        'modelsNum' => 'modelsCount',
51
        'nmodels' => 'modelsCount',
52
        'offersNum' => 'offersCount',
53
        'topVendors' => 'vendors',
54
        'innerCategories' => 'children',
55
        'count' => 'offersCount',
56
        'uniq_name' => 'uniqueName',
57
    ];
58
59
    /**
60
     * Retrieve the id property
61
     *
62
     * @return int|null
63
     */
64 10
    public function getId()
65
    {
66 10
        return $this->id;
67
    }
68
69
    /**
70
     * Retrieve the name property
71
     *
72
     * @return string|null
73
     */
74 10
    public function getName()
75
    {
76 10
        return $this->name;
77
    }
78
79
    /**
80
     * Retrieve the uniqueName property
81
     *
82
     * @return string|null
83
     */
84 4
    public function getUniqueName()
85
    {
86 4
        return $this->uniqueName;
87
    }
88
89
    /**
90
     * Retrieve the parentId property
91
     *
92
     * @return int|null
93
     */
94 3
    public function getParentId()
95
    {
96 3
        return $this->parentId;
97
    }
98
99
    /**
100
     * Retrieve the type property
101
     *
102
     * @return string|null
103
     */
104 3
    public function getType()
105
    {
106 3
        return $this->type;
107
    }
108
109
    /**
110
     * Retrieve the childrenCount property
111
     *
112
     * @return int|null
113
     */
114 3
    public function getChildrenCount()
115
    {
116 3
        return $this->childrenCount;
117
    }
118
119
    /**
120
     * Retrieve the offersCount property
121
     *
122
     * @return int|null
123
     */
124 4
    public function getOffersCount()
125
    {
126 4
        return $this->offersCount;
127
    }
128
129
    /**
130
     * Retrieve the modelsCount property
131
     *
132
     * @return int|null
133
     */
134 5
    public function getModelsCount()
135
    {
136 5
        return $this->modelsCount;
137
    }
138
139
    /**
140
     * Retrieve the isVisual property
141
     *
142
     * @return bool|null
143
     */
144 4
    public function getIsVisual()
145
    {
146 4
        return $this->isVisual;
147
    }
148
149
    /**
150
     * Retrieve the vendors property
151
     *
152
     * @note Property available during /popular request.
153
     * @note Property available during /popular/category request.
154
     *
155
     * @return Vendors|null
156
     */
157 2
    public function getVendors()
158
    {
159 2
        return $this->vendors;
160
    }
161
162
    /**
163
     * Retrieve the children property
164
     *
165
     * @note Property available during /vendor request.
166
     *
167
     * @return Categories|null
168
     */
169 2
    public function getChildren()
170
    {
171 2
        return $this->children;
172
    }
173
174
    /**
175
     * Retrieve the popularity property
176
     *
177
     * @note Property available during /vendor request.
178
     *
179
     * @return float|null
180
     */
181 2
    public function getPopularity()
182
    {
183 2
        return $this->popularity;
184
    }
185
186
    /**
187
     * Retrieve the filterId property
188
     *
189
     * @note Property available during /vendor request.
190
     *
191
     * @return int|null
192
     */
193 2
    public function getFilterId()
194
    {
195 2
        return $this->filterId;
196
    }
197
198
    /**
199
     * Retrieve the filterValueId property
200
     *
201
     * @note Property available during /vendor request.
202
     *
203
     * @return int|null
204
     */
205 2
    public function getFilterValueId()
206
    {
207 2
        return $this->filterValueId;
208
    }
209
210
    /**
211
     * Retrieve the imageUrl property
212
     *
213
     * @note Property available during /vendor request.
214
     *
215
     * @return string|null
216
     */
217 2
    public function getImageUrl()
218
    {
219 2
        return $this->imageUrl;
220
    }
221
}
222