Completed
Push — master ( caad37...82c5ce )
by Dmitriy
06:13
created

ResponsePopularModelsGet::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Yandex\Market\Content\Models;
4
5
use Yandex\Common\Model;
6
7
class ResponsePopularModelsGet extends Model
8
{
9
    protected $categories = null;
10
11
    protected $mappingClasses = [
12
        'categories' => 'Yandex\Market\Content\Models\Categories'
13
    ];
14
15
    protected $propNameMap = [
16
        'topCategoryList' => 'categories'
17
    ];
18
19
    /**
20
     * Constructor
21
     *
22
     * @param array $data
23
     */
24 2
    public function __construct($data = array())
25
    {
26 2
        parent::__construct($data['popular']);
27 2
    }
28
29
    /**
30
     * Retrieve the categories property
31
     *
32
     * @return Categories|null
33
     */
34 2
    public function getCategories()
35
    {
36 2
        return $this->categories;
37
    }
38
}
39