Completed
Push — master ( e67ef9...d5a49f )
by Tobias
03:42
created

UpdateResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 33
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 4 1
A getMessage() 0 4 1
1
<?php
2
3
/*
4
 * Copyright (C) 2013-2016 Mailgun
5
 *
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Mailgun\Resource\Api\Tag;
11
12
use Mailgun\Resource\ApiResponse;
13
14
/**
15
 * @author Tobias Nyholm <[email protected]>
16
 */
17
final class UpdateResponse implements ApiResponse
18
{
19
    /**
20
     * @var string
21
     */
22
    private $message;
23
24
    /**
25
     * @param string $message
26
     */
27
    private function __construct($message)
28
    {
29
        $this->message = $message;
30
    }
31
32
    /**
33
     * @param array $data
34
     *
35
     * @return UpdateResponse
36
     */
37
    public static function create(array $data)
38
    {
39
        return new self($data['message']);
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getMessage()
46
    {
47
        return $this->message;
48
    }
49
}
50