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