HeaderAuthenticate::setSessionId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace DMT\WebservicesNl\Client\Soap\Authorization;
4
5
use DMT\Soap\Serializer\SoapHeaderInterface;
6
use JMS\Serializer\Annotation as JMS;
7
8
/**
9
 * @JMS\AccessType("public_method")
10
 * @JMS\XmlRoot("HeaderAuthenticate", namespace="http://www.webservices.nl/soap/")
11
 */
12
class HeaderAuthenticate implements SoapHeaderInterface
13
{
14
    /**
15
     * @JMS\SerializedName("reactid")
16
     * @JMS\Type("string")
17
     * @JMS\XmlElement(cdata=false)
18
     *
19
     * @var string
20
     */
21
    protected $sessionId;
22
23
    /**
24
     * HeaderAuthenticate constructor.
25
     *
26
     * @param string $sessionId
27
     */
28 1
    public function __construct(string $sessionId)
29
    {
30 1
        $this->setSessionId($sessionId);
31 1
    }
32
33
    /**
34
     * @return string
35
     */
36 1
    public function getSessionId(): string
37
    {
38 1
        return $this->sessionId;
39
    }
40
41
    /**
42
     * @param string $sessionId
43
     */
44 2
    public function setSessionId(string $sessionId): void
45
    {
46 2
        $this->sessionId = $sessionId;
47 2
    }
48
}
49