Completed
Push — master ( 0c70fa...a4aba1 )
by Tobias
22:26
created

Attachment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 7 1
A getData() 0 4 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\Attachment;
11
12
use Mailgun\Model\ApiResponse;
13
14
/**
15
 * @author Tobias Nyholm <[email protected]>
16
 */
17
class Attachment implements ApiResponse
18
{
19
    private $data;
20
21
    public static function create(array $data)
22
    {
23
        $new = new self();
24
        $new->data = $data;
25
26
        return $new;
27
    }
28
29
    public function getData()
30
    {
31
        return $this->data;
32
    }
33
}
34