Completed
Push — master ( da8fcc...d64df6 )
by Asmir
02:56
created

Restriction   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 71.43%
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 20
ccs 5
cts 7
cp 0.7143
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addCheck() 0 5 1
A getChecks() 0 4 1
A getChecksByType() 0 4 2
1
<?php
2
namespace GoetasWebservices\XML\XSDReader\Schema\Inheritance;
3
4
class Restriction extends Base
5
{
6
7
    protected $checks = array();
8
9 39
    public function addCheck($type, $value)
10
    {
11 39
        $this->checks[$type][] = $value;
12 39
        return $this;
13
    }
14
15 6
    public function getChecks()
16
    {
17 6
        return $this->checks;
18
    }
19
    public function getChecksByType($type)
20
    {
21
        return isset($this->checks[$type])?$this->checks[$type]:array();
22
    }
23
}