Restriction   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
cbo 1
dl 0
loc 20
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 Goetas\XML\XSDReader\Schema\Inheritance;
3
4
class Restriction extends Base
5
{
6
7
    protected $checks = array();
8
9
    public function addCheck($type, $value)
10
    {
11
        $this->checks[$type][] = $value;
12
        return $this;
13
    }
14
15
    public function getChecks()
16
    {
17
        return $this->checks;
18
    }
19
    public function getChecksByType($type)
20
    {
21
        return isset($this->checks[$type])?$this->checks[$type]:array();
22
    }
23
}