Completed
Pull Request — master (#12)
by Jan
02:25
created

TaxRecord   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 4
c 3
b 1
f 0
lcom 0
cbo 0
dl 0
loc 32
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A getTaxId() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Defr\Ares;
4
5
/**
6
 * Class TaxRecord.
7
 *
8
 * @author Dennis Fridrich <[email protected]>
9
 */
10
class TaxRecord
11
{
12
    /**
13
     * @var string
14
     */
15
    private $taxId = null;
16
17
    /**
18
     * TaxRecord constructor.
19
     * @param string $taxId
20
     */
21
    public function __construct($taxId)
22
    {
23
        $this->taxId = !empty($taxId) ? $taxId : null;
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getTaxId()
30
    {
31
        return $this->taxId;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function __toString()
38
    {
39
        return strval($this->taxId);
40
    }
41
}
42