Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 12 | public function get($key, $default = null): WidgetInterface |
|
44 | { |
||
45 | try { |
||
46 | 12 | return parent::get($key, $default); |
|
47 | 4 | } catch (Throwable $e) { |
|
48 | 4 | throw new CollectionItemNotFoundException( |
|
49 | 4 | sprintf('`%s` collection does not have item with name `%s`', get_class($this), $key) |
|
50 | ); |
||
54 |