Contact   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setIndividual() 0 4 2
A setConsentForPublishing() 0 4 2
1
<?php
2
3
namespace AfriCC\EPP\Extension\NASK\Create;
4
5
use AfriCC\EPP\ExtensionInterface;
6
use AfriCC\EPP\Frame\Command\Create\Contact as ContactCreate;
7
8
class Contact extends ContactCreate 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 entity type of contact
15
     *
16
     * @param bool $individual True if person, false if company
17
     */
18
    public function setIndividual($individual = false)
19
    {
20
        $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:individual', $individual ? 1 : 0);
21
    }
22
23
    /**
24
     * Set consent for publishing
25
     *
26
     * Don't use
27
     *
28
     * Ignored since 6.1.19
29
     * Up until 6.1.19 this HAD to be true if Individual was to be False
30
     *
31
     * @deprecated Since NASK registry 6.1.19, removed in registry 6.2.1
32
     *
33
     * @param bool $consent
34
     */
35
    public function setConsentForPublishing($consent = false)
36
    {
37
        $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:consentForPublishing', $consent ? 1 : 0);
38
    }
39
}
40