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

ResponsePopularModelsGet   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCategories() 0 4 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