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

Group::findSomethingLikeThis()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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