BatchStatusResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 5
dl 0
loc 39
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 10 1
A getStat() 0 4 1
A getDetails() 0 4 1
1
<?php declare(strict_types=1);
2
namespace Loevgaard\Linkmobility\Response;
3
4
use Assert\Assert;
5
use Loevgaard\Linkmobility\Response\BatchStatusResponse\Details;
6
use Loevgaard\Linkmobility\Response\BatchStatusResponse\Stat;
7
8
class BatchStatusResponse extends Response
9
{
10
    /**
11
     * @var Stat
12
     */
13
    protected $stat;
14
15
    /**
16
     * @var Details
17
     */
18
    protected $details;
19
20 1
    public function init() : void
21
    {
22 1
        Assert::that($this->data)
23 1
            ->keyExists('stat')
24 1
            ->keyExists('details')
25
        ;
26
27 1
        $this->stat = new Stat($this->data['stat']);
28 1
        $this->details = new Details($this->data['details']);
29 1
    }
30
31
    /**
32
     * @return Stat
33
     */
34 1
    public function getStat(): Stat
35
    {
36 1
        return $this->stat;
37
    }
38
39
    /**
40
     * @return Details
41
     */
42 1
    public function getDetails(): Details
43
    {
44 1
        return $this->details;
45
    }
46
}
47