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

Restriction::getChecksByType()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

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