Passed
Push — main ( 6bf038...578b82 )
by Aleksandr
03:45 queued 32s
created

AdvPrice   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 48
ccs 6
cts 6
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getPrice() 0 3 1
A getCode() 0 3 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/request-delivery-status
14
 * @JMS\XmlRoot("advprice")
15
 */
16
class AdvPrice
17
{
18
    use Fillable;
19
20
    /**
21
     * Код услуги
22
     *
23
     * @JMS\XmlAttribute()
24
     * @JMS\Type("int")
25
     */
26
    private int $code;
27
28
    /**
29
     * Цена услуги
30
     * @JMS\XmlAttribute()
31
     * @JMS\Type("float")
32
     */
33
    private float $price;
34
35
    /**
36
     * Наименование услуги
37
     * @JMS\XmlValue()
38
     * @JMS\Type("string")
39
     */
40
    private string $name;
41
42
    /**
43
     * @return int
44
     */
45 3
    public function getCode(): int
46
    {
47 3
        return $this->code;
48
    }
49
50
    /**
51
     * @return float
52
     */
53 2
    public function getPrice(): float
54
    {
55 2
        return $this->price;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 3
    public function getName(): string
62
    {
63 3
        return $this->name;
64
    }
65
}
66