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