Balance   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 15
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A balance() 0 7 1
1
<?php
2
3
namespace Amelia\Monzo\Api;
4
5
use Amelia\Monzo\Models\Balance as BalanceModel;
6
7
trait Balance
8
{
9
    /**
10
     * Get a balance for the current user.
11
     *
12
     * @param string $account
13
     * @return \Amelia\Monzo\Models\Balance
14
     */
15
    public function balance(string $account = null)
16
    {
17
        $results = $this->call('GET', 'balance', [
18
            'account_id' => $account ?? $this->getAccountId(),
19
        ]);
20
21
        return new BalanceModel($results, $this);
22
    }
23
}
24