Passed
Push — php-7.1 ( 926e65...55d18e )
by SignpostMarv
07:28
created

AbstractNamedGroupItem   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 37
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
     * @var Schema
10
     */
11
    protected $schema;
12
13
    /**
14
     * @var string
15
     */
16
    protected $doc = '';
17
18
    public function __construct(Schema $schema, string $name)
19
    {
20
        $this->schema = $schema;
21
        $this->name = $name;
22
    }
23
24
    public function getDoc(): string
25
    {
26
        return $this->doc;
27
    }
28
29
    /**
30
     * @return $this
31
     */
32
    public function setDoc(string $doc): self
33
    {
34
        $this->doc = $doc;
35
36
        return $this;
37
    }
38
39
    public function getSchema(): Schema
40
    {
41
        return $this->schema;
42
    }
43
}
44