| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 2.1481 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function createPlugin(array $config = []): Plugin |
||
| 25 | { |
||
| 26 | if (! class_exists(CachePlugin::class)) { |
||
| 27 | 1 | throw new \LogicException('To use the stopwatch plugin you need to install the "php-http/stopwatch-plugin" package.'); |
|
| 28 | } |
||
| 29 | 1 | ||
| 30 | return new StopwatchPlugin($this->container->get($config['stopwatch'])); |
||
| 31 | } |
||
| 33 |