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

Filial::getCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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