Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Filter extends AbstractSPCItem |
||
15 | { |
||
16 | /** @var int */ |
||
17 | protected $maxResults; |
||
18 | |||
19 | /** |
||
20 | * @param bool $supported |
||
21 | * @param int $maxResults |
||
22 | */ |
||
23 | public function __construct($supported, $maxResults) |
||
24 | { |
||
25 | parent::__construct($supported); |
||
26 | |||
27 | $this->maxResults = $maxResults; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return int |
||
32 | */ |
||
33 | public function getMaxResults() |
||
34 | { |
||
35 | return $this->maxResults; |
||
36 | } |
||
37 | |||
38 | public function serializeObject() |
||
39 | { |
||
40 | $result = parent::serializeObject(); |
||
41 | |||
42 | if ($this->isSupported()) { |
||
43 | $result['maxResults'] = $this->maxResults; |
||
44 | } |
||
45 | |||
46 | return $result; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param array $arr |
||
51 | * |
||
52 | * @return Filter |
||
53 | */ |
||
54 | public static function deserializeObject(array $arr) |
||
61 | } |
||
62 | } |
||
63 |