Error   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getErrorMessage() 0 3 1
A getError() 0 3 1
A getErrorCode() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DalliSDK\Models\Responses;
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/createbasket
14
 * @JMS\XmlRoot("error")
15
 */
16
class Error
17
{
18
    use Fillable;
19
20
    /**
21
     * Код элемента с ошибкой
22
     *
23
     * @JMS\XmlAttribute()
24
     * @JMS\Type("string")
25
     * @JMS\SerializedName("error")
26
     */
27
    private string $error;
28
29
    /**
30
     * Код ошибки
31
     *
32
     * @JMS\XmlAttribute()
33
     * @JMS\Type("int")
34
     * @JMS\SerializedName("errorCode")
35
     */
36
    private int $errorCode;
37
38
    /**
39
     * Сообщение об ошибке
40
     *
41
     * @JMS\XmlAttribute()
42
     * @JMS\Type("string")
43
     * @JMS\SerializedName("errorMessage")
44
     */
45
    private string $errorMessage;
46
47
    /**
48
     * @return string
49
     */
50 6
    public function getError(): string
51
    {
52 6
        return $this->error;
53
    }
54
55
    /**
56
     * @return int
57
     */
58 6
    public function getErrorCode(): int
59
    {
60 6
        return $this->errorCode;
61
    }
62
63
    /**
64
     * @return string
65
     */
66 6
    public function getErrorMessage(): string
67
    {
68 6
        return $this->errorMessage;
69
    }
70
}
71