Completed
Push — master ( 3fbd33...51cff9 )
by David
02:08
created

Attachment   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

3 Methods

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