AddressForm::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ticketpark\SaferpayJson\Request\Container;
6
7
use JMS\Serializer\Annotation\SerializedName;
8
use JMS\Serializer\Annotation\Type;
9
10
final class AddressForm
11
{
12
    public const MANDATORY_FIELD_CITY = 'CITY';
13
    public const MANDATORY_FIELD_COMPANY = 'COMPANY';
14
    public const MANDATORY_FIELD_COUNTRY = 'COUNTRY';
15
    public const MANDATORY_FIELD_EMAIL = 'EMAIL';
16
    public const MANDATORY_FIELD_FIRSTNAME = 'FIRSTNAME';
17
    public const MANDATORY_FIELD_LASTNAME = 'LASTNAME';
18
    public const MANDATORY_FIELD_PHONE = 'PHONE';
19
    public const MANDATORY_FIELD_SALUTATION = 'SALUTATION';
20
    public const MANDATORY_FIELD_STATE = 'STATE';
21
    public const MANDATORY_FIELD_STREET = 'STREET';
22
    public const MANDATORY_FIELD_ZIP = 'ZIP';
23
24
    /**
25
     * @var bool
26
     * @SerializedName("Display")
27
     */
28
    private $display;
29
30
    /**
31
     * @var array<string>|null
32
     * @SerializedName("MandatoryFields")
33
     */
34
    private $mandatoryFields = [];
35
36
    public function __construct(bool $display)
37
    {
38
        $this->display = $display;
39
    }
40
41
    public function isDisplay(): bool
42
    {
43
        return $this->display;
44
    }
45
46
    public function getMandatoryFields(): ?array
47
    {
48
        return $this->mandatoryFields;
49
    }
50
51
    public function setMandatoryFields(?array $mandatoryFields): self
52
    {
53
        $this->mandatoryFields = $mandatoryFields;
54
55
        return $this;
56
    }
57
}
58