Card   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 34
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUpdateData() 0 10 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 Ishmael Doss <[email protected]>
20
 *
21
 * @see https://www.omise.co/cards-api
22
 *
23
 * @property string object
24
 * @property string id
25
 * @property bool livemode
26
 * @property string location
27
 * @property string country
28
 * @property string city
29
 * @property string bank
30
 * @property string postalCode
31
 * @property string financing
32
 * @property string lastDigits
33
 * @property string brand
34
 * @property int expirationMonth
35
 * @property int expirationYear
36
 * @property string fingerprint
37
 * @property string name
38
 * @property string created
39
 * @property bool deleted
40
 * @property Customer $customer
41
 * @property string $number
42
 * @property int $securityCode
43
 */
44
class Card extends Model
45
{
46
    const EVENT_UPDATE = 'charge.update';
47
    const EVENT_DESTROY = 'charge.destroy';
48
49
    /**
50
     * @var Customer
51
     */
52
    protected $customer;
53
54
    /**
55
     * @var string
56
     */
57
    protected $number;
58
59
    /**
60
     * @var int
61
     */
62
    protected $securityCode;
63
64
    /**
65
     * @return array
66
     */
67
    public function getUpdateData()
68
    {
69
        return [
70
            'name' => $this->name,
71
            'expiration_month' => $this->expirationMonth,
72
            'expiration_year' => $this->expirationYear,
73
            'postal_code' => $this->postalCode,
74
            'city' => $this->city,
75
        ];
76
    }
77
}
78