Completed
Push — master ( b6f7ca...4aea47 )
by Olivier
03:30
created

TransferData   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createFromArray() 0 7 1
A getDestinationId() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Shapin\Stripe\Model\PaymentIntent;
11
12
use Shapin\Stripe\Model\CreatableFromArray;
13
14
final class TransferData implements CreatableFromArray
15
{
16
    /**
17
     * @var ?string
18
     */
19
    private $destinationId;
20
21
    public static function createFromArray(array $data): self
22
    {
23
        $model = new self();
24
        $model->destinationId = $data['destination'];
25
26
        return $model;
27
    }
28
29
    public function getDestinationId(): ?string
30
    {
31
        return $this->destinationId;
32
    }
33
}
34