Completed
Pull Request — master (#21)
by Artur
03:04
created

CheckVatResponse::getRequestDate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
ccs 0
cts 4
cp 0
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
crap 6
1
<?php
2
3
namespace Ddeboer\Vatin\Vies\Response;
4
5
class CheckVatResponse
6
{
7
    private $countryCode;
8
9
    private $vatNumber;
10
11
    private $requestDate;
12
13
    private $valid;
14
15
    private $name;
16
17
    private $address;
18
19
    public function getCountryCode()
20
    {
21
        return $this->countryCode;
22
    }
23
24
    public function getVatNumber()
25
    {
26
        return $this->vatNumber;
27
    }
28
29
    public function getRequestDate()
30
    {
31
        if (!$this->requestDate instanceof \DateTime) {
32
            $this->requestDate = new \DateTime($this->requestDate);
33
        }
34
35
        return $this->requestDate;
36
    }
37
38
    public function isValid()
39
    {
40
        return $this->valid;
41
    }
42
43
    public function getName()
44
    {
45
        return $this->name;
46
    }
47
48
    public function getAddress()
49
    {
50
        return $this->address;
51
    }
52
}