| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 15 | private function fromObjectToNameCallableList($name) |
|
| 29 | { |
||
| 30 | 15 | if (is_object($name) && is_callable($name)) { |
|
| 31 | 14 | if (method_exists($name, "__toString")) { |
|
| 32 | 13 | return [(string)$name, $name]; |
|
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | 2 | throw new InvalidArgumentException("Your command should implements '__toString' method and should be a callable thing"); |
|
| 37 | } |
||
| 38 | |||
| 53 |