Accounts   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 22
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A list() 0 3 1
A show() 0 3 1
1
<?php
2
3
namespace Glorand\Drip\Api;
4
5
use Glorand\Drip\Api\Response\ApiResponse;
6
7
class Accounts extends Api
8
{
9
    /**
10
     * List all accounts.
11
     *
12
     * @return \Glorand\Drip\Api\Response\ApiResponse
13
     */
14 1
    public function list(): ApiResponse
15
    {
16 1
        return $this->sendGet('accounts');
17
    }
18
19
    /**
20
     * Fetch an account.
21
     *
22
     * @param string $accountId
23
     *
24
     * @return \Glorand\Drip\Api\Response\ApiResponse
25
     */
26 1
    public function show(string $accountId): ApiResponse
27
    {
28 1
        return $this->sendGet("accounts/$accountId");
29
    }
30
}
31