Passed
Push — master ( 2944ee...dfe2d2 )
by Asmir
02:04
created

Header   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getData() 0 3 1
A mustUnderstand() 0 5 1
A getOptions() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\SoapServices\Metadata\Arguments\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