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

Group::loadGroupBeforeCheckingChildNodes()   B

Complexity

Conditions 4
Paths 4

Size

Total Lines 26
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 5.5726

Importance

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