| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 9 | final class PluginClientBuilder |
||
| 10 | { |
||
| 11 | /** @var Plugin[] */ |
||
| 12 | private $plugins; |
||
| 13 | |||
| 14 | /** @var ?PluginClient */ |
||
| 15 | private $client; |
||
| 16 | |||
| 17 | public function addPlugin(string $name, Plugin $plugin): void |
||
| 18 | { |
||
| 19 | $this->plugins[$name] = $plugin; |
||
| 20 | $this->client = null; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function removePlugin(string $name): void |
||
| 24 | { |
||
| 25 | unset($this->plugins[$name]); |
||
| 26 | $this->client = null; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getPlugin(string $name): Plugin |
||
| 36 | } |
||
| 37 | |||
| 38 | public function createClient($client, array $options = []): PluginClient |
||
| 49 | } |
||
| 50 | } |
||
| 51 |