Service::getCode()   A
last analyzed

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 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
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
 * Модель типов доставки
12
 *
13
 * @see https://api.dalli-service.com/v1/doc/request-types-of-delivery
14
 * @JMS\XmlRoot("service")
15
 */
16
class Service
17
{
18
    use Fillable;
19
20
    /**
21
     * Код типа
22
     *
23
     * @JMS\Type("int")
24
     */
25
    public int $code;
26
27
    /**
28
     * Название типа
29
     *
30
     * @JMS\Type("string")
31
     */
32
    public string $name;
33
34
35
    /**
36
     * @return int
37
     */
38 3
    public function getCode(): int
39
    {
40 3
        return $this->code;
41
    }
42
43
    /**
44
     * @return string
45
     */
46 3
    public function getName(): string
47
    {
48 3
        return $this->name;
49
    }
50
}
51