Completed
Pull Request — master (#23)
by
unknown
02:32
created

Item::getDoc()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
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
    protected $doc;
10
11
    protected $schema;
12
13
    protected $name;
14
15
    protected $type;
16
17 47
    public function __construct(Schema $schema, $name)
18
    {
19 47
        $this->schema = $schema;
20 47
        $this->name = $name;
21 47
    }
22
23 47
    public function getName()
24
    {
25 47
        return $this->name;
26
    }
27
28
    public function setName($name)
29
    {
30
        $this->name = $name;
31
32
        return $this;
33
    }
34
35
    /**
36
     * @return Type
37
     */
38 22
    public function getType()
39
    {
40 22
        return $this->type;
41
    }
42
43 47
    public function setType(Type $type)
44
    {
45 47
        $this->type = $type;
46
47 47
        return $this;
48
    }
49
50 1
    public function getDoc()
51
    {
52 1
        return $this->doc;
53
    }
54
55 47
    public function setDoc($doc)
56
    {
57 47
        $this->doc = $doc;
58
59 47
        return $this;
60
    }
61
62 47
    public function getSchema()
63
    {
64 47
        return $this->schema;
65
    }
66
}
67