BatchStatusResponse::getDetails()   A
last analyzed

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 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