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

Group::getDoc()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 3
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 3
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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