ElementRef   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 2

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 11
c 5
b 0
f 0
cbo 2
dl 0
loc 77
rs 10

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getReferencedElement() 0 4 1
A getType() 0 4 1
A getMin() 0 4 1
A setMin() 0 5 1
A getMax() 0 4 1
A setMax() 0 5 1
A isQualified() 0 4 1
A setQualified() 0 5 1
A isNil() 0 4 1
A setNil() 0 5 1
1
<?php
2
namespace Goetas\XML\XSDReader\Schema\Element;
3
4
use Goetas\XML\XSDReader\Schema\Item;
5
6
class ElementRef extends Item implements ElementSingle
7
{
8
9
    protected $wrapped;
10
11
    protected $min = 1;
12
13
    protected $max = 1;
14
15
    protected $qualified = true;
16
17
    protected $nil = false;
18
19
    public function __construct(ElementDef $element)
20
    {
21
        parent::__construct($element->getSchema(), $element->getName());
22
        $this->wrapped = $element;
23
    }
24
25
    /**
26
     *
27
     * @return ElementDef
28
     */
29
    public function getReferencedElement()
30
    {
31
        return $this->wrapped;
32
    }
33
34
    public function getType()
35
    {
36
        return $this->wrapped->getType();
37
    }
38
39
    public function getMin()
40
    {
41
        return $this->min;
42
    }
43
44
    public function setMin($min)
45
    {
46
        $this->min = $min;
47
        return $this;
48
    }
49
50
    public function getMax()
51
    {
52
        return $this->max;
53
    }
54
55
    public function setMax($max)
56
    {
57
        $this->max = $max;
58
        return $this;
59
    }
60
61
    public function isQualified()
62
    {
63
        return $this->qualified;
64
    }
65
66
    public function setQualified($qualified)
67
    {
68
        $this->qualified = (boolean) $qualified;
69
        return $this;
70
    }
71
72
    public function isNil()
73
    {
74
        return $this->nil;
75
    }
76
77
    public function setNil($nil)
78
    {
79
        $this->nil = (boolean) $nil;
80
        return $this;
81
    }
82
}
83