Completed
Push — master ( 4b1c9c...cf6085 )
by SignpostMarv
04:26
created

ElementContainerTrait::addElement()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace GoetasWebservices\XML\XSDReader\Schema\Element;
4
5
trait ElementContainerTrait
6
{
7
    /**
8
     * @var ElementItem[]
9
     */
10
    protected $elements = array();
11
12
    /**
13
     * @return ElementItem[]
14
     */
15 17
    public function getElements()
16
    {
17 17
        return $this->elements;
18
    }
19
20 47
    public function addElement(ElementItem $element)
21
    {
22 47
        $this->elements[] = $element;
23 47
    }
24
}
25