Completed
Push — master ( 5addfc...31be61 )
by Manuel
03:09
created

AddressForm::setMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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