Completed
Push — master ( 64e776...8a3d14 )
by Ibrahim
02:49
created

Bank   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 28
ccs 0
cts 22
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A root() 0 4 1
A getList() 0 5 1
A resolveBvn() 0 6 1
A resolve() 0 7 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
    public static function root()
11
    {
12
        return '/bank';
13
    }
14
    public static function getList()
15
    {
16
        return [ RouteInterface::METHOD_KEY   => RouteInterface::GET_METHOD,
17
            RouteInterface::ENDPOINT_KEY => Bank::root() ];
18
    }
19
20
    public static function resolveBvn()
21
    {
22
        return [RouteInterface::METHOD_KEY   => RouteInterface::GET_METHOD,
23
            RouteInterface::ENDPOINT_KEY => Bank::root() . '/resolve_bvn/{bvn}',
24
            RouteInterface::ARGS_KEY     => ['bvn'] ];
25
    }
26
27
    public static function resolve()
28
    {
29
        return [RouteInterface::METHOD_KEY   => RouteInterface::GET_METHOD,
30
            RouteInterface::ENDPOINT_KEY => Bank::root() . '/resolve',
31
            RouteInterface::PARAMS_KEY   => ['account_number',
32
                'bank_code' ] ];
33
    }
34
}
35