AttributeRef::getUse()   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\Attribute;
3
4
use Goetas\XML\XSDReader\Schema\Item;
5
6
class AttributeRef extends Item implements AttributeSingle
7
{
8
9
    protected $qualified = true;
10
11
    protected $nil = false;
12
13
    protected $use = self::USE_OPTIONAL;
14
15
    /**
16
     *
17
     * @var Attribute
18
     */
19
    protected $wrapped;
20
21
    public function __construct(AttributeDef $att)
22
    {
23
        parent::__construct($att->getSchema(), $att->getName());
24
        $this->wrapped = $att;
0 ignored issues
show
Documentation Bug introduced by
It seems like $att of type object<Goetas\XML\XSDRea...Attribute\AttributeDef> is incompatible with the declared type object<Goetas\XML\XSDRea...ma\Attribute\Attribute> of property $wrapped.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
25
    }
26
    /**
27
     *
28
     * @return AttributeDef
29
     */
30
    public function getReferencedAttribute()
31
    {
32
        return $this->wrapped;
33
    }
34
35
    public function getType()
36
    {
37
        return $this->wrapped->getType();
38
    }
39
40
    public function isQualified()
41
    {
42
        return $this->qualified;
43
    }
44
45
    public function setQualified($qualified)
46
    {
47
        $this->qualified = $qualified;
48
        return $this;
49
    }
50
51
    public function isNil()
52
    {
53
        return $this->nil;
54
    }
55
56
    public function setNil($nil)
57
    {
58
        $this->nil = $nil;
59
        return $this;
60
    }
61
62
    public function getUse()
63
    {
64
        return $this->use;
65
    }
66
67
    public function setUse($use)
68
    {
69
        $this->use = $use;
70
        return $this;
71
    }
72
}
73