Completed
Push — master ( da8fcc...d64df6 )
by Asmir
02:56
created

Item::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
namespace GoetasWebservices\XML\XSDReader\Schema;
3
4
use GoetasWebservices\XML\XSDReader\Schema\Type\Type;
5
use GoetasWebservices\XML\XSDReader\Schema\Schema;
6
use GoetasWebservices\XML\XSDReader\Schema\SchemaItem;
7
8
abstract class Item implements SchemaItem
9
{
10
11
    protected $doc;
12
13
    protected $schema;
14
15
    protected $name;
16
17
    protected $type;
18
19 39
    public function __construct(Schema $schema, $name)
20
    {
21 39
        $this->schema = $schema;
22 39
        $this->name = $name;
23 39
    }
24
25 39
    public function getName()
26
    {
27 39
        return $this->name;
28
    }
29
30
    public function setName($name)
31
    {
32
        $this->name = $name;
33
        return $this;
34
    }
35
    /**
36
     *
37
     * @return Type
38
     */
39 16
    public function getType()
40
    {
41 16
        return $this->type;
42
    }
43
44 39
    public function setType(Type $type)
45
    {
46 39
        $this->type = $type;
47 39
        return $this;
48
    }
49
50
    public function getDoc()
51
    {
52
        return $this->doc;
53
    }
54
55 39
    public function setDoc($doc)
56
    {
57 39
        $this->doc = $doc;
58 39
        return $this;
59
    }
60
61 39
    public function getSchema()
62
    {
63 39
        return $this->schema;
64
    }
65
}
66