| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public static function firstParameterType(callable $callable): string |
||
| 12 | { |
||
| 13 | $reflection = new ReflectionFunction($callable); |
||
| 14 | |||
| 15 | $parameterTypes = array_map(function (ReflectionParameter $parameter) { |
||
| 16 | return $parameter->getClass() ? $parameter->getClass()->name : null; |
||
| 17 | }, $reflection->getParameters()); |
||
| 18 | |||
| 19 | return $parameterTypes[0] ?? ''; |
||
| 20 | } |
||
| 21 | |||
| 31 |