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

Attachment::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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