| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | 5 | public function __construct($callable) |
|
| 28 | { |
||
| 29 | 5 | if (!is_callable($callable)) { |
|
| 30 | 1 | throw new \InvalidArgumentException(sprintf( |
|
| 31 | 1 | 'The first argument must be a callable, but "%s" given.', |
|
| 32 | 1 | is_object($callable) ? get_class($callable) : gettype($callable) |
|
| 33 | 1 | )); |
|
| 34 | } |
||
| 35 | |||
| 36 | 4 | $this->callable = $callable; |
|
| 37 | 4 | } |
|
| 38 | |||
| 47 |