Completed
Push — master ( 43a76d...75ce5f )
by David
01:41
created

JobDownloadUrl   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 28
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 1
A __construct() 0 3 1
A getCsv() 0 4 1
A getJson() 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\EmailValidationV4;
13
14
use Mailgun\Model\ApiResponse;
15
16
final class JobDownloadUrl implements ApiResponse
17
{
18
    private $csv;
19
    private $json;
20
21 4
    public static function create(array $data): self
22
    {
23 4
        $model = new self();
24 4
        $model->csv = $data['csv'] ?? null;
25 4
        $model->json = $data['json'] ?? null;
26
27 4
        return $model;
28
    }
29
30 4
    private function __construct()
31
    {
32 4
    }
33
34 1
    public function getCsv(): ?string
35
    {
36 1
        return $this->csv;
37
    }
38
39 1
    public function getJson(): ?string
40
    {
41 1
        return $this->json;
42
    }
43
}
44