ASTArray   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 36
c 0
b 0
f 0
wmc 4
lcom 1
cbo 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getElements() 0 4 1
A setElements() 0 4 1
A addElement() 0 4 1
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