| 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 | 121 | public function define($methodName, $callable) |
|
| 31 | { |
||
| 32 | 121 | if (is_callable($callable) || (is_string($callable) && mb_strpos($callable, '@'))) { |
|
| 33 | 121 | $this->methods[$methodName] = $callable; |
|
| 34 | } else { |
||
| 35 | throw new \InvalidArgumentException("$callable should be string Class@method or a php callable"); |
||
| 36 | } |
||
| 50 |