Completed
Push — master ( 43a76d...75ce5f )
by David
01:41
created

CreateBulkJobResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
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 36
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 create() 0 9 1
A getId() 0 4 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\EmailValidationV4;
13
14
use Mailgun\Model\ApiResponse;
15
16
final class CreateBulkJobResponse implements ApiResponse
17
{
18
    /**
19
     * @var string|null
20
     */
21
    private $id;
22
23
    /**
24
     * @var string|null
25
     */
26
    private $message;
27
28 1
    private function __construct()
29
    {
30 1
    }
31
32 1
    public static function create(array $data): self
33
    {
34 1
        $model = new self();
35
36 1
        $model->id = $data['id'] ?? null;
37 1
        $model->message = $data['message'] ?? null;
38
39 1
        return $model;
40
    }
41
42 1
    public function getId(): ?string
43
    {
44 1
        return $this->id;
45
    }
46
47 1
    public function getMessage(): ?string
48
    {
49 1
        return $this->message;
50
    }
51
}
52