Total Complexity | 4 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class CheckVat implements RequestInterface |
||
16 | { |
||
17 | /** |
||
18 | * @Assert\NotBlank(message="countryCode is required") |
||
19 | * @Assert\Regex(pattern="/^[A-Z]{2}$/", message="countryCode is invalid") |
||
20 | * |
||
21 | * @JMS\Type("string") |
||
22 | * @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $countryCode; |
||
27 | |||
28 | /** |
||
29 | * @Assert\NotBlank(message="vatNumber is required") |
||
30 | * @Assert\Regex(pattern="/^[0-9A-Za-z\+\*\.]{2,12}$/", message="vatNumber is invalid") |
||
31 | * |
||
32 | * @JMS\Type("string") |
||
33 | * @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $vatNumber; |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | 13 | public function getCountryCode(): ?string |
|
43 | { |
||
44 | 13 | return $this->countryCode; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param string $countryCode |
||
49 | */ |
||
50 | 1 | public function setCountryCode(string $countryCode): void |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | 13 | public function getVatNumber(): ?string |
|
59 | { |
||
60 | 13 | return $this->vatNumber; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param string $vatNumber |
||
65 | */ |
||
66 | 1 | public function setVatNumber(string $vatNumber): void |
|
69 | } |
||
70 | } |
||
71 |