| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | public static function forConfiguration(string $widgetId, $widget) : self |
|
| 20 | { |
||
| 21 | 1 | return new self(sprintf( |
|
| 22 | 1 | "Invalid configuration for '%s' widget; widget should be either string, callable or %s instance, %s given", |
|
| 23 | $widgetId, |
||
| 24 | 1 | WidgetInterface::class, |
|
| 25 | gettype($widget) |
||
| 26 | )); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |