Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | private function configureBindings(string $id, Definition $mapper) |
||
25 | { |
||
26 | $classReflection = new \ReflectionClass($mapper->getClass()); |
||
27 | $publicMethods = $classReflection->getMethods(\ReflectionMethod::IS_PUBLIC); |
||
28 | |||
29 | $mapperMethods = array_filter($publicMethods, function (\ReflectionMethod $method) { |
||
30 | return $method->hasReturnType(); |
||
31 | }); |
||
32 | |||
33 | $bindings = []; |
||
34 | foreach ($mapperMethods as $method) { |
||
35 | $bindings[(string) $method->getReturnType()] = [$id, $method->getName()]; |
||
36 | } |
||
37 | |||
38 | return $bindings; |
||
39 | } |
||
40 | } |