Transfer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 57.14%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreateData() 0 8 1
A getUpdateData() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the PhpMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace PhpMob\Omise\Domain;
15
16
use PhpMob\Omise\Model;
17
18
/**
19
 * @author Prawit <[email protected]>
20
 *
21
 * @property string object
22
 * @property string id
23
 * @property string livemode
24
 * @property string location
25
 * @property string recipient
26
 * @property BankAccount bankAccount
27
 * @property bool sent
28
 * @property bool paid
29
 * @property int amount
30
 * @property string currency
31
 * @property int fee
32
 * @property string failureCode
33
 * @property string failureMessage
34
 * @property string transaction
35
 * @property string created
36
 * @property string metadata
37
 */
38
class Transfer extends Model
39
{
40
    const EVENT_CREATE = 'charge.create';
41
    const EVENT_UPDATE = 'charge.update';
42
    const EVENT_DESTROY = 'charge.destroy';
43
    const EVENT_SEND = 'charge.send';
44
    const EVENT_PAY = 'charge.pay';
45
46
    /**
47
     * @return array
48
     */
49 2
    public function getCreateData()
50
    {
51
        return [
52 2
            'amount' => $this->amount,
53 2
            'recipient' => $this->recipient,
54 2
            'metadata' => $this->metadata,
55
        ];
56
    }
57
58
    public function getUpdateData()
59
    {
60
        return [
61
            'amount' => $this->amount,
62
            'metadata' => $this->metadata,
63
        ];
64
    }
65
}
66