SimpleType::getRestriction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Goetas\XML\XSDReader\Schema\Type;
3
4
use Goetas\XML\XSDReader\Schema\Inheritance\Restriction;
5
class SimpleType extends Type
6
{
7
8
    /**
9
     *
10
     * @var Restriction
11
     */
12
    protected $restriction;
13
14
    /**
15
     *
16
     * @var SimpleType[]
17
     */
18
    protected $unions = array();
19
20
    /**
21
     *
22
     * @var SimpleType
23
     */
24
    protected $list;
25
26
    /**
27
     *
28
     * @return Restriction
29
     */
30
    public function getRestriction()
31
    {
32
        return $this->restriction;
33
    }
34
35
    public function setRestriction(Restriction $restriction)
36
    {
37
        $this->restriction = $restriction;
38
        return $this;
39
    }
40
41
    public function addUnion(SimpleType $type)
42
    {
43
        $this->unions[] = $type;
44
        return $this;
45
    }
46
47
    public function getUnions()
48
    {
49
        return $this->unions;
50
    }
51
52
    /**
53
     *
54
     * @return SimpleType
55
     */
56
    public function getList()
57
    {
58
        return $this->list;
59
    }
60
61
    public function setList(SimpleType $list)
62
    {
63
        $this->list = $list;
64
        return $this;
65
    }
66
}
67