Passed
Push — static-analysis ( 0c4f4f...d5a974 )
by SignpostMarv
03:25
created

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