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

ResponseSearchGet   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCategories() 0 4 1
A getRegionDelimiterPosition() 0 4 1
A getRequestParams() 0 4 1
1
<?php
2
3
namespace Yandex\Market\Content\Models;
4
5
use Yandex\Market\Content\Models\Base\PagedModel;
6
7
class ResponseSearchGet extends PagedModel
8
{
9
    protected $categories = null;
10
11
    protected $regionDelimiterPosition = null;
12
13
    protected $requestParams = null;
14
15
    protected $mappingClasses = [
16
        'items' => 'Yandex\Market\Content\Models\SearchResults',
17
        'categories' => 'Yandex\Market\Content\Models\Categories',
18
        'requestParams' => 'Yandex\Market\Content\Models\SearchRequestParams'
19
    ];
20
21
    protected $propNameMap = [
22
        'results' => 'items'
23
    ];
24
25
    /**
26
     * Constructor
27
     *
28
     * @param array $data
29
     */
30 1
    public function __construct($data = array())
31
    {
32 1
        parent::__construct($data['searchResult']);
33 1
    }
34
35
    /**
36
     * Retrieve the categories property
37
     *
38
     * @return Categories|null
39
     */
40 1
    public function getCategories()
41
    {
42 1
        return $this->categories;
43
    }
44
45
    /**
46
     * Retrieve the regionDelimiterPosition property
47
     *
48
     * @return int|null
49
     */
50 1
    public function getRegionDelimiterPosition()
51
    {
52 1
        return $this->regionDelimiterPosition;
53
    }
54
55
    /**
56
     * Retrieve the requestParams property
57
     *
58
     * @return SearchRequestParams|null
59
     */
60 1
    public function getRequestParams()
61
    {
62 1
        return $this->requestParams;
63
    }
64
}
65