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

Contact   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 20
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
8
class Contact extends ContactInfo implements ExtensionInterface
9
{
10
    protected $extension = 'extcon';
11
    protected $extension_xmlns = 'http://www.dns.pl/nask-epp-schema/extcon-2.0';
12
13
    /**
14
     * Set contact authinfo
15
     *
16
     * @param string $pw authinfo
17
     * @param string $roid If specified, authinfo is of domain whose registrant is this contact
18
     */
19
    public function setAuthInfo($pw, $roid = null)
20
    {
21
        $node = $this->set('//epp:epp/epp:command/epp:extension/extcon:info/extcon:authInfo/extcon:pw', $pw);
22
23
        if ($roid !== null) {
24
            $node->setAttribute('roid', $roid);
25
        }
26
    }
27
}
28