ObjectSpec   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 33
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A xmlns() 0 8 2
1
<?php
2
3
/**
4
 * This file is part of the php-epp2 library.
5
 *
6
 * (c) Gunter Grodotzki <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE file
9
 * that was distributed with this source code.
10
 */
11
12
namespace AfriCC\EPP;
13
14
/**
15
 * EPP object definitions and xml namespaces
16
 */
17
class ObjectSpec
18
{
19
    public $specs = [
20
        'epp' => [
21
            'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
22
        ],
23
        'domain' => [
24
            'xmlns' => 'urn:ietf:params:xml:ns:domain-1.0',
25
        ],
26
        'host' => [
27
            'xmlns' => 'urn:ietf:params:xml:ns:host-1.0',
28
        ],
29
        'contact' => [
30
            'xmlns' => 'urn:ietf:params:xml:ns:contact-1.0',
31
        ],
32
        'secDNS' => [
33
            'xmlns' => 'urn:ietf:params:xml:ns:secDNS-1.1',
34
        ],
35
    ];
36
37
    public $mappings = [
38
        'check', 'create', 'delete', 'info', 'renew', 'transfer', 'update',
39
    ];
40
41
    public function xmlns($object)
42
    {
43
        if (!isset($this->specs[$object]['xmlns'])) {
44
            return false;
45
        }
46
47
        return $this->specs[$object]['xmlns'];
48
    }
49
}
50