AbstractECParametersType::toXML()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
nc 1
nop 1
dl 0
loc 12
rs 10
c 1
b 0
f 0
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:ECParametersType
11
 *
12
 * @package simplesaml/xml-security
13
 */
14
abstract class AbstractECParametersType extends AbstractDsig11Element
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSecurity\X...1\AbstractDsig11Element 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...
15
{
16
    /**
17
     * Initialize a ECParametersType element.
18
     *
19
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\FieldID $fieldId
20
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\Curve $curve
21
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\Base $base
22
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\Order $order
23
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\CoFactor|null $coFactor
24
     * @param \SimpleSAML\XMLSecurity\XML\dsig11\ValidationData|null $validationData
25
     */
26
    public function __construct(
27
        protected FieldID $fieldId,
28
        protected Curve $curve,
29
        protected Base $base,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSecurity\XML\dsig11\Base 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...
30
        protected Order $order,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSecurity\XML\dsig11\Order 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...
31
        protected ?CoFactor $coFactor = null,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSecurity\XML\dsig11\CoFactor 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...
32
        protected ?ValidationData $validationData = null,
33
    ) {
34
    }
35
36
37
    /**
38
     * Collect the value of the fieldId-property
39
     *
40
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\FieldID
41
     */
42
    public function getFieldID(): FieldID
43
    {
44
        return $this->fieldId;
45
    }
46
47
48
    /**
49
     * Collect the value of the curve-property
50
     *
51
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\Curve
52
     */
53
    public function getCurve(): Curve
54
    {
55
        return $this->curve;
56
    }
57
58
59
    /**
60
     * Collect the value of the base-property
61
     *
62
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\Base
63
     */
64
    public function getBase(): Base
65
    {
66
        return $this->base;
67
    }
68
69
70
    /**
71
     * Collect the value of the order-property
72
     *
73
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\Order
74
     */
75
    public function getOrder(): Order
76
    {
77
        return $this->order;
78
    }
79
80
81
    /**
82
     * Collect the value of the coFactor-property
83
     *
84
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\CoFactor|null
85
     */
86
    public function getCoFactor(): ?CoFactor
87
    {
88
        return $this->coFactor;
89
    }
90
91
92
    /**
93
     * Collect the value of the validationData-property
94
     *
95
     * @return \SimpleSAML\XMLSecurity\XML\dsig11\ValidationData|null
96
     */
97
    public function getValidationData(): ?ValidationData
98
    {
99
        return $this->validationData;
100
    }
101
102
103
    /**
104
     * Convert this ECParametersType element to XML.
105
     *
106
     * @param \DOMElement|null $parent The element we should append this ECParametersType element to.
107
     */
108
    public function toXML(?DOMElement $parent = null): DOMElement
109
    {
110
        $e = $this->instantiateParentElement($parent);
111
112
        $this->getFieldId()->toXML($e);
113
        $this->getCurve()->toXML($e);
114
        $this->getBase()->toXML($e);
115
        $this->getOrder()->toXML($e);
116
        $this->getCoFactor()?->toXML($e);
117
        $this->getValidationData()?->toXML($e);
118
119
        return $e;
120
    }
121
}
122