ContactFunctions   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 57
ccs 10
cts 10
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getContactIDForInstitution() 0 3 1
A getContactDetails() 0 3 1
A getContactDemographics() 0 3 1
A getContactMarketingRules() 0 3 1
A getContactCommunications() 0 3 1
1
<?php
2
3
namespace MyriadSoap\Endpoints;
4
5
class ContactFunctions extends FunctionsSet
6
{
7
8
9
    /**
10
     * @param int $customerNumber
11
     *
12
     * @return array|mixed
13
     * @throws \MyriadSoap\MyriadSoapException
14
     */
15 1
    public function getContactDetails(int $customerNumber)
16
    {
17 1
        return $this->api->call('SOAP_getContactDetails', [ 'Contact_ID' => $customerNumber, ]);
18
    }
19
20
    /**
21
     * @param int $customerNumber
22
     *
23
     * @return array|mixed
24
     * @throws \MyriadSoap\MyriadSoapException
25
     */
26 1
    public function getContactCommunications(int $customerNumber)
27
    {
28 1
        return $this->api->call('SOAP_getContactCommunications', [ 'Contact_ID' => $customerNumber, ]);
29
    }
30
31
    /**
32
     * @param int $institutionID
33
     *
34
     * @return array|mixed
35
     * @throws \MyriadSoap\MyriadSoapException
36
     */
37 1
    public function getContactIDForInstitution(int $institutionID)
38
    {
39 1
        return $this->api->call('SOAP_getContactIDForInstitution', [ 'Institution_ID' => $institutionID, ]);
40
    }
41
42
    /**
43
     * @param int $customerNumber
44
     *
45
     * @return array|mixed
46
     * @throws \MyriadSoap\MyriadSoapException
47
     */
48 1
    public function getContactDemographics(int $customerNumber)
49
    {
50 1
        return $this->api->call('SOAP_getContactDemographics', [ 'Contact_ID' => $customerNumber, ]);
51
    }
52
53
    /**
54
     * @param int $customerNumber
55
     *
56
     * @return array|mixed
57
     * @throws \MyriadSoap\MyriadSoapException
58
     */
59 1
    public function getContactMarketingRules(int $customerNumber)
60
    {
61 1
        return $this->api->call('SOAP_getContactMarketingRules', [ 'Contact_ID' => $customerNumber, ]);
62
    }
63
}
64