| Conditions | 4 |
| Paths | 4 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 144 | public function configure(ClientInterface $client): void |
|
| 39 | { |
||
| 40 | 144 | foreach ($this->endpoints as $name => $endpoint) { |
|
| 41 | 144 | if (!$client->provider()->supportsEndpoint($name)) { |
|
| 42 | 4 | continue; |
|
| 43 | } |
||
| 44 | |||
| 45 | 144 | $endpoint = is_callable($endpoint) ? $endpoint($client) : new $endpoint($client); |
|
| 46 | 144 | $client->endPoints()->add($endpoint); |
|
| 47 | } |
||
| 50 |