| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | final class CompositeProxyFactory implements ProxyFactory |
||
| 11 | { |
||
| 12 | private $key; |
||
| 13 | /** @var ProxyFactory[] */ |
||
| 14 | private $factories; |
||
| 15 | |||
| 16 | public function __construct(string $decisionKey, array $factories) |
||
| 17 | { |
||
| 18 | $this->key = $decisionKey; |
||
| 19 | foreach ($factories as $key => $factory) { |
||
| 20 | $this->addFactory($key, $factory); |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 24 | private function addFactory(string $key, ProxyFactory $factory): void |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function decidingBy(string $key, array $factories): self |
||
| 32 | } |
||
| 33 | |||
| 34 | public function create(array $knownData = []): Proxy |
||
| 39 |