Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | 1 | public function widget(string $name, array $options = [], array $extenstionOptions = []): string |
|
50 | { |
||
51 | 1 | $outputErrors = array_get_value($extenstionOptions, 'outputErrors', true); |
|
52 | |||
53 | try { |
||
54 | 1 | return $this->widgetFactory->create($name, $options); |
|
|
|||
55 | 1 | } catch (Exception $e) { |
|
56 | 1 | if ($outputErrors) { |
|
57 | 1 | return $e->getMessage(); |
|
58 | } |
||
59 | |||
60 | 1 | return ''; |
|
61 | } |
||
64 |