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

NodeChildRelation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getNode() 0 4 1
A isAllowDefault() 0 4 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