Completed
Push — php-7.1 ( d2218e...926e65 )
by SignpostMarv
08:16
created

Group::loadAttributeGroup()   B

Complexity

Conditions 3
Paths 1

Size

Total Lines 44
Code Lines 36

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 31
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 36
nc 1
nop 3
dl 0
loc 44
ccs 31
cts 31
cp 1
crap 3
rs 8.8571
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\XML\XSDReader\Schema\Attribute;
6
7
use GoetasWebservices\XML\XSDReader\Schema\Schema;
8
9 View Code Duplication
class Group implements AttributeItem, AttributeContainer
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    use AttributeItemTrait;
12
    use AttributeContainerTrait;
13
14
    /**
15
     * @var Schema
16
     */
17
    protected $schema;
18
19
    /**
20
     * @var string
21
     */
22
    protected $doc = '';
23
24
    public function __construct(Schema $schema, string $name)
25
    {
26
        $this->schema = $schema;
27
        $this->name = $name;
28 45
    }
29
30 45
    public function getDoc(): string
31 45
    {
32 45
        return $this->doc;
33
    }
34
35
    /**
36
     * @return $this
37
     */
38
    public function setDoc(string $doc): self
39
    {
40
        $this->doc = $doc;
41
42 45
        return $this;
43
    }
44 45
45
    public function getSchema(): Schema
46 45
    {
47
        return $this->schema;
48
    }
49
}
50