ExtensionMenuEvent::getBundleName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Zikula package.
7
 *
8
 * Copyright Zikula - https://ziku.la/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zikula\ThemeBundle\ExtensionMenu;
15
16
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Menu\MenuItemInterface;
17
18
class ExtensionMenuEvent
19
{
20
    public function __construct(
21
        private readonly string $bundleName,
22
        private readonly string $context,
23
        private readonly iterable $menu
24
    ) {
25
    }
26
27
    public function getBundleName(): string
28
    {
29
        return $this->bundleName;
30
    }
31
32
    public function getMenuContext(): string
33
    {
34
        return $this->context;
35
    }
36
37
    /**
38
     * @return MenuItemInterface[]
39
     */
40
    public function getMenu(): iterable
41
    {
42
        return $this->menu;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->menu returns the type iterable which is incompatible with the documented return type EasyCorp\Bundle\EasyAdmi...enu\MenuItemInterface[].
Loading history...
43
    }
44
}
45