Passed
Pull Request — master (#21)
by Jaime Pérez
02:00
created

AbstractEcElement   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespacePrefix() 0 3 1
A getNamespaceURI() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSecurity\XML\ec;
6
7
use SimpleSAML\XML\AbstractXMLElement;
8
use SimpleSAML\XMLSecurity\Constants;
9
10
11
/**
12
 * Abstract class to be implemented by all the classes in this namespace
13
14
 * @package simplesamlphp/xml-security
15
 */
16
abstract class AbstractEcElement extends AbstractXMLElement
17
{
18
    /** @var string */
19
    public const NS = Constants::C14N_EXCLUSIVE_WITHOUT_COMMENTS;
20
21
    /** @var string */
22
    public const NS_PREFIX = 'ec';
23
24
25
    /**
26
     * Get the namespace for the element.
27
     *
28
     * @return string
29
     */
30
    public static function getNamespaceURI(): string
31
    {
32
        return static::NS;
33
    }
34
35
36
    /**
37
     * Get the namespace prefix for the element.
38
     *
39
     * @return string
40
     */
41
    public static function getNamespacePrefix(): string
42
    {
43
        return static::NS_PREFIX;
44
    }
45
}