Conditions | 4 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 4.25 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 117 | public function define($methodName, $callable) |
|
31 | { |
||
32 | 117 | if (is_callable($callable) || (is_string($callable) and mb_strpos($callable, '@'))) { |
|
33 | 117 | $this->methods[$methodName] = $callable; |
|
34 | } else { |
||
35 | throw new \InvalidArgumentException("$callable should be string Class@method or a php callable"); |
||
36 | } |
||
50 |