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

ImportResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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