Completed
Pull Request — master (#84)
by
unknown
01:28
created

Contact   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setAuthInfo() 0 8 2
1
<?php
2
3
namespace AfriCC\EPP\Extension\NASK\Info;
4
5
use AfriCC\EPP\ExtensionInterface;
6
use AfriCC\EPP\Frame\Command\Info\Contact as ContactInfo;
7
use AfriCC\EPP\ExtensionTrait;
8
9
class Contact extends ContactInfo implements ExtensionInterface
10
{
11
    use ExtensionTrait;
12
13
    protected $extension = 'extcon';
14
    protected $extension_xmlns = 'http://www.dns.pl/nask-epp-schema/extcon-2.0';
15
16
    /**
17
     * Set contact authinfo
18
     *
19
     * @param string $pw authinfo
20
     * @param string $roid If specified, authinfo is of domain whose registrant is this contact
21
     */
22
    public function setAuthInfo($pw, $roid = null)
23
    {
24
        $node = $this->set('//epp:epp/epp:command/epp:extension/extcon:info/extcon:authInfo/extcon:pw', $pw);
25
26
        if ($roid !== null) {
27
            $node->setAttribute('roid', $roid);
28
        }
29
    }
30
}
31