Prices   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 55
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getMax() 0 4 1
A getMin() 0 4 1
A getAvg() 0 4 1
1
<?php
2
3
namespace Yandex\Market\Content\Models;
4
5
use Yandex\Market\Content\Models\Base\Price;
6
7
class Prices extends Price
8
{
9
    protected $max = null;
10
11
    protected $min = null;
12
13
    protected $avg = null;
14
15
    protected $propNameMap = [
16
        'curCode' => 'currencyCode',
17
        'curName' => 'currencyName'
18
    ];
19
20
    /**
21
     * Constructor
22
     *
23
     * @param array $data
24
     */
25 6
    public function __construct($data = array())
26
    {
27 6
        parent::__construct($data);
28
        // @todo: create property propNameExcl?
29 6
        unset($this->value);
30 6
    }
31
32
    /**
33
     * Retrieve the max property
34
     *
35
     * @return float|null
36
     */
37 6
    public function getMax()
38
    {
39 6
        return $this->max;
40
    }
41
42
    /**
43
     * Retrieve the min property
44
     *
45
     * @return float|null
46
     */
47 6
    public function getMin()
48
    {
49 6
        return $this->min;
50
    }
51
52
    /**
53
     * Retrieve the avg property
54
     *
55
     * @return float|null
56
     */
57 5
    public function getAvg()
58
    {
59 5
        return $this->avg;
60
    }
61
}
62