| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 90% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class WidgetFactory extends Factory |
||
| 12 | { |
||
| 13 | private static ?FactoryInterface $factory = null; |
||
| 14 | |||
| 15 | 8 | private function __construct(ContainerInterface $container = null, array $definitions = []) |
|
| 18 | 8 | } |
|
| 19 | |||
| 20 | 8 | public static function initialize(ContainerInterface $container = null, array $definitions = []): void |
|
| 23 | 8 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Creates a widget defined by config passed |
||
| 27 | * |
||
| 28 | * @param string|array|callable $config parameters for creating a widget |
||
| 29 | * @throws \RuntimeException if factory was not initialized |
||
| 30 | * @throws \Yiisoft\Factory\Exceptions\InvalidConfigException |
||
| 31 | */ |
||
| 32 | 7 | public static function createWidget($config): Widget |
|
| 41 |