ASTGroup::getElements()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Netdudes\DataSourceryBundle\UQL\AST;
3
4
/**
5
 * Class ASTGroup
6
 *
7
 * Abstract Syntax Tree node representing a Group of <assertions> with a <logic> between them.
8
 */
9
class ASTGroup
10
{
11
    private $logic;
12
13
    private $elements;
14
15
    /**
16
     * @param $logic
17
     * @param $elements
18
     */
19
    public function __construct($logic, $elements)
20
    {
21
        $this->logic = $logic;
22
        $this->elements = $elements;
23
    }
24
25
    /**
26
     * $elements can be an array out of ASTGroup and ASTAssertion
27
     *
28
     * @return array
29
     */
30
    public function getElements()
31
    {
32
        return $this->elements;
33
    }
34
35
    /**
36
     * $elements can be an array out of ASTGroup and ASTAssertion
37
     *
38
     * @param array $elements
39
     */
40
    public function setElements($elements)
41
    {
42
        $this->elements = $elements;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getLogic()
49
    {
50
        return $this->logic;
51
    }
52
53
    /**
54
     * @param string $logic
55
     */
56
    public function setLogic($logic)
57
    {
58
        $this->logic = $logic;
59
    }
60
}
61