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

Acta::getDate()   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 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-delivery-status
14
 * @JMS\XmlRoot("acta")
15
 */
16
class Acta
17
{
18
    use Fillable;
19
20
    /**
21
     * Дата акта
22
     *
23
     * @JMS\XmlAttribute()
24
     * @JMS\Type("string")
25
     */
26
    private ?string $date = null;
27
28
    /**
29
     * Название акта
30
     *
31
     * @JMS\XmlValue
32
     * @JMS\Type("string")
33
     */
34
    private ?string $name = null;
35
36
    /**
37
     * @return string|null
38
     */
39 2
    public function getDate(): ?string
40
    {
41 2
        return $this->date;
42
    }
43
44
    /**
45
     * @return string|null
46
     */
47 2
    public function getName(): ?string
48
    {
49 2
        return $this->name;
50
    }
51
52
    /**
53
     * @JMS\PostDeserialize
54
     */
55 1
    private function postDeserialize(): void
0 ignored issues
show
Unused Code introduced by
The method postDeserialize() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
56
    {
57 1
        $this->date = ($this->date !== '') ? $this->date : null;
58 1
        $this->name = ($this->name !== '') ? $this->name : null;
59
    }
60
}
61