Passed
Push — master ( dba7cd...d89126 )
by Asmir
01:36
created

Header   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 3 1
A getOptions() 0 3 1
A mustUnderstand() 0 5 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\SoapServices\Metadata\Headers;
6
7
class Header
8
{
9
    /**
10
     * @var object
11
     */
12
    private $data;
13
    /**
14
     * @var array
15
     */
16
    private $options = [];
17
18
    public function __construct(object $data, array $options = [])
19
    {
20
        $this->data = $data;
21
        $this->options = $options;
22
    }
23
24
    public function getData(): object
25
    {
26
        return $this->data;
27
    }
28
29
    public function getOptions(): array
30
    {
31
        return $this->options;
32
    }
33
34
    public function mustUnderstand(): Header
35
    {
36
        $this->options['mustUnderstand'] = true;
37
38
        return $this;
39
    }
40
}
41