Completed
Push — master ( 1b0b24...55881e )
by SignpostMarv
05:36
created

ElementRef::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 1
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\XML\XSDReader\Schema\Element;
6
7
use GoetasWebservices\XML\XSDReader\Schema\Type\Type;
8
9
class ElementRef extends AbstractElementSingle
10
{
11
    /**
12 47
     * @var ElementDef
13
     */
14 47
    protected $wrapped;
15 47
16 47
    public function __construct(ElementDef $element)
17
    {
18
        parent::__construct($element->getSchema(), $element->getName());
19
        $this->wrapped = $element;
20
    }
21
22
    public function getName(): string
23
    {
24
        return $this->wrapped->getName();
25
    }
26
27
    /**
28
     * @return ElementDef
29
     */
30
    public function getReferencedElement(): ElementDef
31
    {
32
        return $this->wrapped;
33
    }
34
35
    public function getType(): ?Type
36
    {
37
        return $this->wrapped->getType();
38
    }
39
}
40