CustomerDeleted   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 35
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A createFromArray() 0 8 1
A getId() 0 4 1
A isDeleted() 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\Customer;
11
12
use Shapin\Stripe\Model\CreatableFromArray;
13
14
final class CustomerDeleted implements CreatableFromArray
15
{
16
    /**
17
     * @var string
18
     */
19
    private $id;
20
21
    /**
22
     * @var bool
23
     */
24
    private $deleted;
25
26 1
    private function __construct()
27
    {
28 1
    }
29
30 1
    public static function createFromArray(array $data): self
31
    {
32 1
        $model = new self();
33 1
        $model->id = $data['id'];
34 1
        $model->deleted = (bool) $data['deleted'];
35
36 1
        return $model;
37
    }
38
39 1
    public function getId(): string
40
    {
41 1
        return $this->id;
42
    }
43
44 1
    public function isDeleted(): bool
45
    {
46 1
        return $this->deleted;
47
    }
48
}
49