Passed
Push — static-analysis ( 5a8282...f0242b )
by SignpostMarv
03:33
created

AbstractNamedGroupItem::setDoc()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
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 45
    public function __construct(Schema $schema, $name)
23
    {
24 45
        $this->schema = $schema;
25 45
        $this->name = $name;
26 45
    }
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 45
    public function setDoc($doc)
42
    {
43 45
        $this->doc = $doc;
44
45 45
        return $this;
46
    }
47
48
    /**
49
     * @return Schema
50
     */
51 45
    public function getSchema()
52
    {
53 45
        return $this->schema;
54
    }
55
}
56