Transferrecipient::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 18
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 17
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 20
ccs 18
cts 18
cp 1
crap 1
rs 9.7
1
<?php
2
3
namespace Yabacon\Paystack\Routes;
4
5
use Yabacon\Paystack\Contracts\RouteInterface;
6
7
class Transferrecipient implements RouteInterface
8
{
9
10 3
    public static function root()
11
    {
12 3
        return '/transferrecipient';
13
    }
14
15 2
    public static function create()
16
    {
17
        return [
18 2
            RouteInterface::METHOD_KEY => RouteInterface::POST_METHOD,
19 2
            RouteInterface::ENDPOINT_KEY => Transferrecipient::root(),
20 2
            RouteInterface::PARAMS_KEY => [
21 2
                'type',
22 2
                'name',
23 2
                'description',
24 2
                'metadata',
25 2
                'bank_code',
26 2
                'currency',
27 2
                'account_number',
28 2
            ],
29 2
            RouteInterface::REQUIRED_KEY => [
30 2
                RouteInterface::PARAMS_KEY => [
31 2
                    'type',
32 2
                    'name',
33 2
                    'bank_code',
34 2
                    'account_number',
35 2
                ],
36 2
            ],
37 2
        ];
38
    }
39
40 2
    public static function getList()
41
    {
42
        return [
43 2
            RouteInterface::METHOD_KEY => RouteInterface::GET_METHOD,
44 2
            RouteInterface::ENDPOINT_KEY => Transferrecipient::root(),
45 2
            RouteInterface::PARAMS_KEY => [
46 2
                'perPage',
47 2
                'page',
48 2
            ],
49 2
        ];
50
    }
51
}
52