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

ElementRef   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 27
c 0
b 0
f 0
ccs 4
cts 8
cp 0.5
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getReferencedElement() 0 3 1
A getType() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace GoetasWebservices\XML\XSDReader\Schema\Element;
4
5
class ElementRef extends AbstractElementSingle
6
{
7
    /**
8
     * @var ElementDef
9
     */
10
    protected $wrapped;
11
12 47
    public function __construct(ElementDef $element)
13
    {
14 47
        parent::__construct($element->getSchema(), $element->getName());
15 47
        $this->wrapped = $element;
16 47
    }
17
18
    /**
19
     * @return ElementDef
20
     */
21
    public function getReferencedElement()
22
    {
23
        return $this->wrapped;
24
    }
25
26
    /**
27
     * @return \GoetasWebservices\XML\XSDReader\Schema\Type\Type|null
28
     */
29
    public function getType()
30
    {
31
        return $this->wrapped->getType();
32
    }
33
}
34