Conditions | 8 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 8 |
Changes | 0 |
1 | <?php |
||
91 | 20 | public function match($type, $value = null) |
|
92 | { |
||
93 | 20 | if ($this->type === $type || (is_array($type) && in_array($this->type, $type))) { |
|
94 | 20 | if (null === $value || $this->value == $value || (is_array($value) && in_array($this->value, $value))) { |
|
95 | 20 | return true; |
|
96 | } |
||
97 | 9 | } |
|
98 | 14 | return false; |
|
99 | } |
||
100 | } |