Passed
Push — master ( a7f2e0...7bcc2b )
by Tim
02:25
created

AbstractPnBFieldParamsType::getK3()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSecurity\XML\dsig11;
6
7
use DOMElement;
8
9
/**
10
 * Abstract class representing a dsig11:PnBFieldParamsType
11
 *
12
 * @package simplesaml/xml-security
13
 */
14
abstract class AbstractPnBFieldParamsType extends AbstractCharTwoFieldParamsType
15
{
16
    /**
17
     * Initialize a PnBFieldParamsType element.
18
     *
19
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\M $m
20
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\K1 $k1
21
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\K2 $k2
22
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\K3 $k3
23
     */
24
    public function __construct(
25
        M $m,
26
        protected K1 $k1,
27
        protected K2 $k2,
28
        protected K3 $k3,
29
    ) {
30
        parent::__construct($m);
31
    }
32
33
34
    /**
35
     * Collect the value of the k1-property
36
     *
37
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\K1
38
     */
39
    public function getK1(): K1
40
    {
41
        return $this->k1;
42
    }
43
44
45
    /**
46
     * Collect the value of the k2-property
47
     *
48
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\K2
49
     */
50
    public function getK2(): K2
51
    {
52
        return $this->k2;
53
    }
54
55
56
    /**
57
     * Collect the value of the k3-property
58
     *
59
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\K3
60
     */
61
    public function getK3(): K3
62
    {
63
        return $this->k3;
64
    }
65
66
67
    /**
68
     * Convert this PnBFieldParamsType element to XML.
69
     *
70
     * @param \DOMElement|null $parent The element we should append this PnBFieldParamsType element to.
71
     * @return \DOMElement
72
     */
73
    public function toXML(?DOMElement $parent = null): DOMElement
74
    {
75
        $e = parent::toXML($parent);
76
        $this->getK1()->toXML($e);
77
        $this->getK2()->toXML($e);
78
        $this->getK3()->toXML($e);
79
80
        return $e;
81
    }
82
}
83