Completed
Push — master ( 126b63...733cbc )
by Randy
04:39
created

SecurityContextToken::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Dgame\Soap\Component;
4
5
use Dgame\Soap\Attribute\XmlnsAttribute;
6
use Dgame\Soap\XmlElement;
7
8
/**
9
 * Class SecurityContextToken
10
 * @package Dgame\Soap\Component
11
 */
12
final class SecurityContextToken extends NamedNode
13
{
14
    /**
15
     * SecurityContextToken constructor.
16
     *
17
     * @param string $token
18
     */
19 3
    public function __construct(string $token)
20
    {
21 3
        parent::__construct('wsc');
22
23 3
        $this->setAttribute(new XmlnsAttribute('wsc', 'http://schemas.xmlsoap.org/ws/2005/02/sc'));
24 3
        $this->appendElement(new XmlElement('Identifier', $token));
25
    }
26
}