Completed
Push — master ( c0a386...56655a )
by Tobias
06:16 queued 03:48
created

UpdateResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * Copyright (C) 2013 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\Model\Ip;
11
12
use Mailgun\Model\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 1
    private function __construct()
25
    {
26 1
    }
27
28 1
    public static function create(array $data)
29
    {
30 1
        $model = new self();
31 1
        $model->message = $data['message'];
32
33 1
        return $model;
34
    }
35
36
    /**
37
     * @return string
38
     */
39 1
    public function getMessage()
40
    {
41 1
        return $this->message;
42
    }
43
}
44