TaxRecord::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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
     *
20
     * @param string $taxId
21
     */
22
    public function __construct($taxId)
23
    {
24
        $this->taxId = !empty($taxId) ? $taxId : null;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getTaxId()
31
    {
32
        return $this->taxId;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function __toString()
39
    {
40
        return strval($this->taxId);
41
    }
42
}
43