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

ElementContainerTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

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