Passed
Pull Request — master (#71)
by Axel
09:04
created

SimpleType   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 4
eloc 7
c 2
b 1
f 0
dl 0
loc 30
ccs 6
cts 6
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getList() 0 3 1
A setList() 0 3 1
A getUnions() 0 3 1
A addUnion() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\XML\XSDReader\Schema\Type;
6
7
class SimpleType extends Type
8
{
9
    /**
10
     * @var SimpleType[]
11
     */
12
    protected array $unions = [];
13
14
    protected ?SimpleType $list;
15
16
    public function addUnion(self $type): void
17
    {
18
        $this->unions[] = $type;
19
    }
20
21
    /**
22
     * @return SimpleType[]
23
     */
24
    public function getUnions(): array
25
    {
26 15
        return $this->unions;
27
    }
28 15
29
    public function getList(): ?self
30
    {
31 74
        return $this->list;
32
    }
33 74
34 74
    public function setList(self $list): void
35
    {
36 74
        $this->list = $list;
37
    }
38
}
39