AbstractTnBFieldParamsType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getK() 0 3 1
A toXML() 0 6 1
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:TnBFieldParamsType
11
 *
12
 * @package simplesaml/xml-security
13
 */
14
abstract class AbstractTnBFieldParamsType extends AbstractCharTwoFieldParamsType
15
{
16
    /**
17
     * Initialize a TnBFieldParamsType element.
18
     *
19
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\M $m
20
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\K $k
21
     */
22
    public function __construct(
23
        M $m,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSecurity\XML\dsig11\M was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
        protected K $k,
25
    ) {
26
        parent::__construct($m);
27
    }
28
29
30
    /**
31
     * Collect the value of the k-property
32
     *
33
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\K
34
     */
35
    public function getK(): K
36
    {
37
        return $this->k;
38
    }
39
40
41
    /**
42
     * Convert this TnBFieldParamsType element to XML.
43
     *
44
     * @param \DOMElement|null $parent The element we should append this TnBFieldParamsType element to.
45
     */
46
    public function toXML(?DOMElement $parent = null): DOMElement
47
    {
48
        $e = parent::toXML($parent);
49
        $this->getK()->toXML($e);
50
51
        return $e;
52
    }
53
}
54