Account   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fetch() 0 4 1
A refresh() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the PhpMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace PhpMob\Omise\Api;
15
16
use PhpMob\Omise\Api;
17
use PhpMob\Omise\Domain\Account as Domain;
18
19
/**
20
 * @author Ishmael Doss <[email protected]>
21
 *
22
 * @see https://www.omise.co/account-api
23
 */
24
final class Account extends Api
25
{
26
    /**
27
     * @return Domain
28
     */
29 2
    public function fetch()
30
    {
31 2
        return $this->doRequest('GET', '/account');
32
    }
33
34
    /**
35
     * @param Domain $account
36
     */
37 1
    public function refresh(Domain $account)
38
    {
39 1
        $account->updateStore($this->fetch()->toArray());
40 1
    }
41
}
42