Issues (24)

src/Models/Acta.php (1 issue)

Severity
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
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