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

AbstractNamedGroupItem   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Test Coverage

Coverage 81.82%

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 49
ccs 9
cts 11
cp 0.8182
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDoc() 0 3 1
A __construct() 0 4 1
A getSchema() 0 3 1
A setDoc() 0 5 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