Token   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 20
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCreateData() 0 14 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
 * @property string id
22
 * @property bool livemode
23
 * @property bool used
24
 * @property Card card
25
 * @property string datetime
26
 */
27
class Token extends Model
28
{
29
    /**
30
     * @return array
31
     */
32 1
    public function getCreateData()
33
    {
34
        return [
35
            'card' => [
36 1
                'name' => $this->card->name,
37 1
                'number' => $this->card->number,
38 1
                'expiration_month' => $this->card->expirationMonth,
39 1
                'expiration_year' => $this->card->expirationYear,
40 1
                'city' => $this->card->city,
41 1
                'postal_code' => $this->card->postalCode,
42 1
                'security_code' => $this->card->securityCode,
43
            ],
44
        ];
45
    }
46
}
47