Completed
Push — master ( 737d23...df8264 )
by Joachim
04:33
created

BatchStatusResponse::getStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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
    public function init() : void
21
    {
22
        Assert::that($this->data)
23
            ->keyExists('stat')
24
            ->keyExists('details')
25 1
        ;
26
27 1
        $this->stat = new Stat($this->data['stat']);
28 1
        $this->details = new Details($this->data['details']);
29 1
    }
30 1
31 1
    /**
32
     * @return Stat
33
     */
34 1
    public function getStat(): Stat
35 1
    {
36 1
        return $this->stat;
37
    }
38 1
39 1
    /**
40
     * @return Details
41
     */
42
    public function getDetails(): Details
43
    {
44 1
        return $this->details;
45
    }
46
}
47