| Conditions | 4 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function geDriverConfig(string $name): string|Autowire |
||
| 41 | { |
||
| 42 | if (!isset($this->config['drivers'][$name])) { |
||
| 43 | throw new InvalidArgumentException( |
||
| 44 | \sprintf('Config for trace `%s` is not defined.', $name) |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 48 | $driver = $this->config['drivers'][$name]; |
||
| 49 | |||
| 50 | if (!\is_string($driver) && $driver instanceof Autowire) { |
||
| 51 | throw new InvalidArgumentException( |
||
| 52 | \sprintf('Trace type value for `%s` must be a string or %s', $name, Autowire::class) |
||
| 53 | ); |
||
| 54 | } |
||
| 55 | |||
| 56 | return $driver; |
||
| 57 | } |
||
| 59 |