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