| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | abstract class AbstractFactory |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $mapper = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Checks if a service exists and throws an exception |
||
| 32 | * |
||
| 33 | * @param string $name |
||
| 34 | * |
||
| 35 | * @throws Exception |
||
| 36 | */ |
||
| 37 | 330 | protected function checkService(string $name): void |
|
| 41 | } |
||
| 42 | 320 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Returns the adapters for the factory |
||
| 46 | */ |
||
| 47 | abstract protected function getAdapters(): array; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * AdapterFactory constructor. |
||
| 51 | * |
||
| 52 | * @param array $services |
||
| 53 | */ |
||
| 54 | 468 | protected function init(array $services = []): void |
|
| 64 |