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

ValidationCancelResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 7 1
A __construct() 0 3 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\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