Completed
Push — master ( 4b1c9c...cf6085 )
by SignpostMarv
04:26
created

AbstractNamedGroupItem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
namespace GoetasWebservices\XML\XSDReader\Schema;
4
5
abstract class AbstractNamedGroupItem
6
{
7
    use NamedItemTrait;
8
9
    /**
10
     * @var Schema
11
     */
12
    protected $schema;
13
14
    /**
15
     * @var string|null
16
     */
17
    protected $doc;
18
19
    /**
20
     * @param string $name
21
     */
22 47
    public function __construct(Schema $schema, $name)
23
    {
24 47
        $this->schema = $schema;
25 47
        $this->name = $name;
26 47
    }
27
28
    /**
29
     * @return string|null
30
     */
31
    public function getDoc()
32
    {
33
        return $this->doc;
34
    }
35
36
    /**
37
     * @param string $doc
38
     *
39
     * @return $this
40
     */
41 47
    public function setDoc($doc)
42
    {
43 47
        $this->doc = $doc;
44
45 47
        return $this;
46
    }
47
48
    /**
49
     * @return Schema
50
     */
51 47
    public function getSchema()
52
    {
53 47
        return $this->schema;
54
    }
55
}
56