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

Restriction::addCheck()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
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
}