Completed
Push — master ( 87c59d...6e372e )
by David
03:29 queued 01:52
created

ValidationCancelResponse::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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\MailingList;
13
14
use Mailgun\Model\ApiResponse;
15
16
final class ValidationCancelResponse implements ApiResponse
17
{
18
    private $message;
19
20 1
    public static function create(array $data): self
21
    {
22 1
        $model = new self();
23 1
        $model->message = $data['message'] ?? null;
24
25 1
        return $model;
26
    }
27
28 1
    private function __construct()
29
    {
30 1
    }
31
32 1
    public function getMessage(): ?string
33
    {
34 1
        return $this->message;
35
    }
36
}
37