Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | final class MenuItemFactory extends AbstractNavigationItemFactory |
||
12 | { |
||
13 | /** |
||
14 | * @inheritdoc |
||
15 | */ |
||
16 | 2 | public function create(?array $ops = null): MenuItem |
|
17 | { |
||
18 | 2 | $component = new MenuItem(); |
|
19 | 2 | $this->init($component, $ops); |
|
20 | 2 | $component->setMenuLabel($this->ops['menuLabel']); |
|
21 | 2 | $this->validate($component); |
|
22 | 2 | return $component; |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | 3 | public static function defaultOps(): array |
|
34 | ] |
||
35 | ); |
||
38 |