Completed
Push — master ( b1e9c2...373aee )
by Dominik
02:48
created

NodeChildRelation::getNode()   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 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Saxulum\ElasticSearchQueryBuilder\Node;
4
5
class NodeChildRelation
6
{
7
    /**
8
     * @var AbstractNode
9
     */
10
    protected $node;
11
12
    /**
13
     * @var bool
14
     */
15
    protected $allowDefault;
16
17
    /**
18
     * @param AbstractNode $node
19
     * @param bool         $allowDefault
20
     */
21 1
    public function __construct(AbstractNode $node, $allowDefault)
22
    {
23 1
        $this->node = $node;
24 1
        $this->allowDefault = $allowDefault;
25 1
    }
26
27
    /**
28
     * @return AbstractNode
29
     */
30 1
    public function getNode()
31
    {
32 1
        return $this->node;
33
    }
34
35
    /**
36
     * @return bool
37
     */
38 1
    public function isAllowDefault()
39
    {
40 1
        return $this->allowDefault;
41
    }
42
}
43