Passed
Push — main ( ed4b4c...986270 )
by Aleksandr
09:15
created

Filial   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 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
 * Модель для филиалов компании Dalli
12
 *
13
 * @see https://api.dalli-service.com/v1/doc/filials
14
 * @JMS\XmlRoot("filials")
15
 */
16
class Filial
17
{
18
    use Fillable;
19
20
    /**
21
     * Код филиала
22
     *
23
     * @JMS\Type("int")
24
     * @JMS\SerializedName("code")
25
     */
26
    private int $code;
27
28
    /**
29
     * Наименование
30
     *
31
     * @JMS\Type("string")
32
     * @JMS\SerializedName("name")
33
     */
34
    private string $name;
35
36
    /**
37
     * @return int
38
     */
39 2
    public function getCode(): int
40
    {
41 2
        return $this->code;
42
    }
43
44
    /**
45
     * @return string
46
     */
47 2
    public function getName(): string
48
    {
49 2
        return $this->name;
50
    }
51
}
52