Completed
Push — master ( 1fd018...1044a6 )
by David
20:21
created

ImportResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 7 1
A getMessage() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright (C) 2013 Mailgun
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license. See the LICENSE file for details.
10
 */
11
12
namespace Mailgun\Model\Suppression\Whitelist;
13
14
use Mailgun\Model\ApiResponse;
15
16
/**
17
 * @author Artem Bondarenko <[email protected]>
18
 */
19
final class ImportResponse implements ApiResponse
20
{
21
    private $message;
22
23
    final private function __construct()
24
    {
25
    }
26
27
    public static function create(array $data): self
28
    {
29
        $model = new static();
30
        $model->message = $data['message'] ?? null;
31
32
        return $model;
33
    }
34
35
    public function getMessage(): ?string
36
    {
37
        return $this->message;
38
    }
39
}
40