@@ -23,9 +23,10 @@ |
||
23 | 23 | |
24 | 24 | public function define($methodName, $callable) |
25 | 25 | { |
26 | - if (is_callable($callable) || (is_string($callable) and mb_strpos($callable, '@'))) |
|
27 | - $this->methods[$methodName] = $callable; |
|
28 | - else |
|
29 | - throw new \InvalidArgumentException("$callable should be string Class@method or a php callable"); |
|
26 | + if (is_callable($callable) || (is_string($callable) and mb_strpos($callable, '@'))) { |
|
27 | + $this->methods[$methodName] = $callable; |
|
28 | + } else { |
|
29 | + throw new \InvalidArgumentException("$callable should be string Class@method or a php callable"); |
|
30 | + } |
|
30 | 31 | } |
31 | 32 | } |