Below   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 57
ccs 10
cts 10
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrice() 0 3 1
A getBelowSum() 0 3 1
A setPrice() 0 4 1
A setBelowSum() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DalliSDK\Models;
6
7
use DalliSDK\Traits\Fillable;
8
use JMS\Serializer\Annotation as JMS;
9
10
/**
11
 * Модель для границы стоимости настроек дифференциальной стоимости доставки
12
 *
13
 * @see https://api.dalli-service.com/v1/doc/createbasket
14
 * @JMS\XmlRoot("below")
15
 */
16
class Below
17
{
18
    use Fillable;
19
20
    /**
21
     * Граница стоимости выкупаемого
22
     *
23
     * @JMS\XmlAttribute()
24
     * @JMS\Type("float")
25
     * @JMS\SerializedName("below_sum")
26
     */
27
    private float $belowSum;
28
29
    /**
30
     * Стоимость выкупаемого до соответствующей границы
31
     *
32
     * @JMS\XmlAttribute()
33
     * @JMS\Type("float")
34
     */
35
    private float $price;
36
37
    /**
38
     * @return float
39
     */
40 2
    public function getBelowSum(): float
41
    {
42 2
        return $this->belowSum;
43
    }
44
45
    /**
46
     * @return float
47
     */
48 2
    public function getPrice(): float
49
    {
50 2
        return $this->price;
51
    }
52
53
    /**
54
     * @param float $belowSum
55
     *
56
     * @return Below
57
     */
58 1
    public function setBelowSum(float $belowSum): Below
59
    {
60 1
        $this->belowSum = $belowSum;
61 1
        return $this;
62
    }
63
64
    /**
65
     * @param float $price
66
     *
67
     * @return Below
68
     */
69 1
    public function setPrice(float $price): Below
70
    {
71 1
        $this->price = $price;
72 1
        return $this;
73
    }
74
}
75