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

Item::getType()   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
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace GoetasWebservices\XML\XSDReader\Schema;
4
5
use GoetasWebservices\XML\XSDReader\Schema\Type\Type;
6
7
abstract class Item implements SchemaItem
8
{
9
    use NamedItemTrait;
10
    use SchemaItemTrait;
11
12
    /**
13
     * @var Type|null
14
     */
15
    protected $type;
16
17
    /**
18
     * @param string $name
19
     */
20 47
    public function __construct(Schema $schema, $name)
21
    {
22 47
        $this->schema = $schema;
23 47
        $this->name = $name;
24 47
    }
25
26
    /**
27
     * @return Type|null
28
     */
29 22
    public function getType()
30
    {
31 22
        return $this->type;
32
    }
33
34
    /**
35
     * @return $this
36
     */
37 47
    public function setType(Type $type)
38
    {
39 47
        $this->type = $type;
40
41 47
        return $this;
42
    }
43
}
44