| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 11 | final class NotInstantiableWithoutWidgetFactoryInitializationException extends NotInstantiableException implements FriendlyExceptionInterface |
||
| 12 | { |
||
| 13 | 1 | public function __construct( |
|
| 14 | private string $widgetClassName, |
||
| 15 | private Throwable $previous, |
||
| 16 | ) { |
||
| 17 | 1 | parent::__construct( |
|
| 18 | 1 | 'Failed to create a widget "' . $this->widgetClassName . '". ' . $previous->getMessage() . |
|
| 19 | 1 | ' Perhaps you need to initialize "' . WidgetFactory::class . '" with DI container to resolve dependencies.', |
|
| 20 | 1 | previous: $previous, |
|
| 21 | 1 | ); |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function getName(): string |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function getSolution(): ?string |
|
| 35 | |||
| 36 | To initialize the widget factory call `WidgetFactory::initialize()` before using the widget. |
||
| 64 |