Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function findFor(string $classFqn) |
||
19 | { |
||
20 | foreach ($this->agents as $agent) { |
||
21 | if ($agent->supports($classFqn)) { |
||
22 | return $agent; |
||
23 | } |
||
24 | } |
||
25 | |||
26 | $classes = array_map(function ($element) { |
||
27 | return get_class($element); |
||
28 | }, $this->agents); |
||
29 | |||
30 | throw new Exception\AgentNotFoundException(sprintf( |
||
31 | 'Could not find an agent supporting class "%s". Registered agents: "%s"', |
||
32 | $classFqn, implode('", "', $classes) |
||
33 | )); |
||
34 | } |
||
35 | |||
62 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.