FaultCode::setValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12\Parts;
4
5
class FaultCode
6
{
7
    /**
8
     * @var string
9
     */
10
    private $value;
11
12
    /**
13
     * @var FaultCode
14
     */
15
    private $subcode;
16
17
    /**
18
     * @return string
19
     */
20 1
    public function getValue()
21
    {
22 1
        return $this->value;
23
    }
24
25
    /**
26
     * @param string $value
27
     */
28 2
    public function setValue($value)
29
    {
30 2
        $this->value = $value;
31 2
    }
32
33
    /**
34
     * @return FaultCode
35
     */
36
    public function getSubcode()
37
    {
38
        return $this->subcode;
39
    }
40
41
    /**
42
     * @param FaultCode $subcode
43
     */
44 1
    public function setSubcode(FaultCode $subcode)
45
    {
46 1
        $this->subcode = $subcode;
47 1
    }
48
49 1
    public function __toString()
50
    {
51 1
        return $this->value . ($this->subcode ? (":" . $this->subcode) : "");
52
    }
53
}
54
55