Balance::balance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 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