ASTArray::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
3
namespace Netdudes\DataSourceryBundle\UQL\AST;
4
5
class ASTArray
6
{
7
    /**
8
     * @var array $elements
9
     */
10
    private $elements;
11
12
    /**
13
     * @param array $elements
14
     */
15
    public function __construct(array $elements = [])
16
    {
17
        $this->elements = $elements;
18
    }
19
20
    /**
21
     * @return array
22
     */
23
    public function getElements()
24
    {
25
        return $this->elements;
26
    }
27
28
    /**
29
     * @param array $elements
30
     */
31
    public function setElements(array $elements)
32
    {
33
        $this->elements = $elements;
34
    }
35
36
    public function addElement($element)
37
    {
38
        $this->elements[] = $element;
39
    }
40
}
41