RouteMenuItem::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 5
dl 0
loc 13
rs 10
c 2
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Braunstetter\MenuBundle\Items;
6
7
final class RouteMenuItem extends Item
8
{
9
    /**
10
     * @param array<string, string> $routeParameters
11
     * @param array<string, mixed>|null $options
12
     */
13
    public function __construct(
14
        string $label,
15
        string $routeName,
16
        array $routeParameters,
17
        ?string $icon,
18
        ?array $options = []
19
    ) {
20
        parent::__construct($label, $icon, $options);
21
22
        $this->setRouteName($routeName);
23
        $this->setRouteParameters($routeParameters);
24
25
        $this->setType(Item::TYPE_ROUTE);
26
    }
27
}
28