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

Group::getDoc()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

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