Passed
Push — static-analysis ( 1958c5...5a8282 )
by SignpostMarv
10:41 queued 08:16
created

Group::loadAttributeGroup()   B

Complexity

Conditions 3
Paths 1

Size

Total Lines 39
Code Lines 30

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 27
CRAP Score 3

Importance

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