Passed
Push — feature/fix-tests ( 289907...67712d )
by Robin
05:28 queued 13s
created

SmsClient   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 23
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPageCode() 0 4 1
A checkCodeAvailability() 0 4 1
A updatePageCode() 0 4 1
1
<?php
2
3
namespace Konsulting\JustGivingApiSdk\ResourceClients;
4
5
class SmsClient extends BaseClient
6
{
7
    protected $aliases = [
8
        'getPageCode'           => 'RetrievePageSmsCode',
9
        'updatePageCode'        => 'UpdatePageSmsCode',
10
        'checkCodeAvailability' => 'CheckSmsCodeAvailability',
11
    ];
12
13 1
    public function getPageCode($pageShortName)
14
    {
15 1
        return $this->get("fundraising/pages/" . $pageShortName . "/sms");
16
    }
17
18
    public function updatePageCode($pageShortName, $updatePageSmsCodeRequest)
19
    {
20
        return $this->put("fundraising/pages/" . $pageShortName . "/sms", $updatePageSmsCodeRequest);
21
    }
22
23 1
    public function checkCodeAvailability($urn)
24
    {
25 1
        return $this->post("sms/urn/" . $urn . "/check");
26
    }
27
}
28