Passed
Push — dev ( 40f0b5...3a2e98 )
by Fike
02:50
created

Context::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace AmaTeam\ElasticSearch\API\Indexing\Validation;
4
5
class Context implements ContextInterface
6
{
7
    /**
8
     * @var string[]
9
     */
10
    private $path = [];
11
    /**
12
     * @var bool
13
     */
14
    private $preserveUnknownEntries = false;
15
16
    /**
17
     * @return string[]
18
     */
19
    public function getPath(): array
20
    {
21
        return $this->path;
22
    }
23
24
    /**
25
     * @param string[] $path
26
     * @return $this
27
     */
28
    public function setPath(array $path): Context
29
    {
30
        $this->path = $path;
31
        return $this;
32
    }
33
34
    /**
35
     * @return bool
36
     */
37
    public function shouldPreserveUnknownOptions(): bool
38
    {
39
        return $this->preserveUnknownEntries;
40
    }
41
42
    /**
43
     * @param bool $preserveUnknownEntries
44
     * @return $this
45
     */
46
    public function setPreserveUnknownEntries(bool $preserveUnknownEntries): Context
47
    {
48
        $this->preserveUnknownEntries = $preserveUnknownEntries;
49
        return $this;
50
    }
51
}
52