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

Item   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
dl 0
loc 60
c 0
b 0
f 0
wmc 8
lcom 0
cbo 0
ccs 18
cts 21
cp 0.8571
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A setName() 0 6 1
A getType() 0 4 1
A setType() 0 6 1
A setDoc() 0 6 1
A getSchema() 0 4 1
A getDoc() 0 4 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