Restriction   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 1
b 0
f 0
dl 0
loc 29
ccs 5
cts 7
cp 0.7143
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addCheck() 0 3 1
A getChecks() 0 3 1
A getChecksByType() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\XML\XSDReader\Schema\Inheritance;
6
7
class Restriction extends Base
8
{
9
    /**
10
     * @var mixed[][]
11
     */
12
    protected $checks = [];
13
14
    /**
15
     * @param mixed[] $value
16
     */
17 74
    public function addCheck(string $type, array $value): void
18
    {
19 74
        $this->checks[$type][] = $value;
20 74
    }
21
22
    /**
23
     * @return mixed[][]
24
     */
25 10
    public function getChecks(): array
26
    {
27 10
        return $this->checks;
28
    }
29
30
    /**
31
     * @return mixed[]
32
     */
33
    public function getChecksByType(string $type): array
34
    {
35
        return $this->checks[$type] ?? [];
36
    }
37
}
38