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

Courier   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
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 44
ccs 6
cts 6
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getCode() 0 3 1
A getPhone() 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("courier")
15
 */
16
class Courier
17
{
18
    use Fillable;
19
20
    /**
21
     * Уникальный код курьера
22
     * @JMS\Type("string")
23
     */
24
    private string $code;
25
26
    /**
27
     * Телефон курьера
28
     * @JMS\Type("string")
29
     */
30
    private ?string $phone = null;
31
32
    /**
33
     * Ф.И.О. курьера
34
     * @JMS\Type("string")
35
     */
36
    private string $name;
37
38
    /**
39
     * @return string
40
     */
41 2
    public function getCode(): string
42
    {
43 2
        return $this->code;
44
    }
45
46
    /**
47
     * @return string|null
48
     */
49 2
    public function getPhone(): ?string
50
    {
51 2
        return $this->phone;
52
    }
53
54
    /**
55
     * @return string
56
     */
57 2
    public function getName(): string
58
    {
59 2
        return $this->name;
60
    }
61
}
62