Test Failed
Push — master ( a6006f...8cc230 )
by Robin
12:30
created

SmsClient   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 33.33%

Importance

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

3 Methods

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