| Conditions | 5 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5.0488 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 33 | public function match(&$actual) |
|
| 32 | { |
||
| 33 | 33 | $function = 'is_' . strtolower($this->_expected); |
|
| 34 | 33 | if (function_exists($function)) { |
|
| 35 | 31 | return $function($actual); |
|
| 36 | 2 | } elseif (is_string($this->_expected) |
|
| 37 | 2 | && (class_exists($this->_expected) || interface_exists($this->_expected))) { |
|
| 38 | 2 | return $actual instanceof $this->_expected; |
|
| 39 | } |
||
| 40 | return false; |
||
| 41 | } |
||
| 42 | |||
| 53 |