Completed
Push — master ( 200759...6ce54b )
by Ibrahim
02:21
created

Bank::resolveBvn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Yabacon\Paystack\Routes;
4
5
use Yabacon\Paystack\Contracts\RouteInterface;
6
7
class Bank implements RouteInterface
8
{
9
10 3
    public static function root()
11
    {
12 3
        return '/bank';
13
    }
14 2
    public static function getList()
15
    {
16
        return [
17 2
            RouteInterface::METHOD_KEY => RouteInterface::GET_METHOD,
18 2
            RouteInterface::ENDPOINT_KEY => Bank::root(),
19 2
        ];
20
    }
21
22 2
    public static function resolveBvn()
23
    {
24
        return [
25 2
            RouteInterface::METHOD_KEY => RouteInterface::GET_METHOD,
26 2
            RouteInterface::ENDPOINT_KEY => Bank::root() . '/resolve_bvn/{bvn}',
27 2
            RouteInterface::ARGS_KEY => ['bvn'],
28 2
        ];
29
    }
30
31 2
    public static function resolve()
32
    {
33
        return [
34 2
            RouteInterface::METHOD_KEY => RouteInterface::GET_METHOD,
35 2
            RouteInterface::ENDPOINT_KEY => Bank::root() . '/resolve',
36 2
            RouteInterface::PARAMS_KEY => [
37 2
                'account_number',
38 2
                'bank_code',
39 2
            ],
40 2
        ];
41
    }
42
}
43