| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | private function getErrorMessage(callable $callable, ParameterException $e) : string |
||
|
|
|||
| 47 | { |
||
| 48 | if (is_array($callable) && count($callable) === 2) { |
||
| 49 | $object = $callable[0]; |
||
| 50 | $class = $callable[0] instanceof WeavedInterface ? (new \ReflectionClass($object))->getParentClass()->getName() : get_class($object); |
||
| 51 | |||
| 52 | return sprintf('%s in %s::%s', $e->getMessage(), $class, (string) $callable[1]); |
||
| 53 | } |
||
| 54 | |||
| 55 | return sprintf('%s', $e->getMessage()); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |